How create class errors?
<p>I create service and I need create class MyErrors (not exception)</p>

<p>My web method returned or data or error, example response "<code>#45#Not valid login or password.</code>"</p>

<p><code>#</code> - is a flag that says an error has occurred
<code>45</code> - code error.</p>

<p>example use error class:</p>

<pre><code>int returnValue = ExistLogin(login);
if (returnValue==0) {
    return Registaration(login, name, password);
} else if(returnValue==1) {
    return Errors.LOGIN_ALREADY_EXISTS.ToString();
}
else return Errors.ConvertToString(returnValue);
</code></pre>

<p>Errors.LOGIN_ALREADY_EXISTS - return number <code>&lt;-1</code></p>

<p>Errors.LOGIN_ALREADY_EXISTS - return string <code>#-1#Error bla bla bla</code></p>

<p>how best to create a class?</p>
