Isn't it easier to just remember the name then the error code anyway. So you can have an Enum like this:


Code:
		enum myCode : int {
			UserException = 100,
			NoteMeException,  //This will imply 101 as the number for this string
		}

Then you can do:
Code:
throw new CustomException((int)myCode.UserException);
You are then throwing an int, and the value of that int is 100.


- ØØ -