Hey All,
I want to use a resource file to store key/value pairs (resx file calls them Name/Value) for errors. I want the Key(Name) to be the error code, and the value to be the message.
My only issue is I do not know how to get a string representation of the Key/Name, as I want to display the code on screen as well.
For instance in the resx file:
Name | Value | Description
E001 | My Error | This is error 1
In Code:
Resources.ERROR 1 will return me me "My Error", but I also want to get "E001" back as well. Is this possible in any way?
Thanks!
I want to use a resource file to store key/value pairs (resx file calls them Name/Value) for errors. I want the Key(Name) to be the error code, and the value to be the message.
My only issue is I do not know how to get a string representation of the Key/Name, as I want to display the code on screen as well.
For instance in the resx file:
Name | Value | Description
E001 | My Error | This is error 1
In Code:
Resources.ERROR 1 will return me me "My Error", but I also want to get "E001" back as well. Is this possible in any way?
Thanks!
Comment