<p>I have a list of error codes I need to reference, kinda like this:</p>

<pre><code>Code / Error Message  
A01 = whatever error  
U01 = another error  
U02 = yet another error type
</code></pre>

<p>I get the Code returned to me via a web service call and I need to display or get the readable error.  So I need a function when passed a Code that returns the readable description. I was just going to do a select case but thought their might be a better way. What is the best way / most effieient way to do this?</p>

Use a Dictionary, (in C#, but the concept and classes are the same):
```
```
// Initialize this once, and store it in the ASP.NET Cache.
Dictionary<String,String> errorCodes = new Dictionary<String,String>();

errorCodes.Add("A01", "Whatever Error");
errorCodes.Add("U01", "Another Error");

// And to get your error code:

string ErrCode = errorCodes[ErrorCodeFromWS];
```
```