Reputation: 9648
I want to create custom error code and message mapping file. Currently I use Dictionary<int, string>
to store them but I think they may have better way to achieve this.
If there is common practice to do this please let me know.
Upvotes: 0
Views: 1051
Reputation: 6814
You could define an enum for your error codes that map to a resource file, that way they can be esaly manage, localized, etc.
Upvotes: 0
Reputation: 166396
Maybe rather have a look at using a resource in the project
Adding and Editing Resources (Visual C#)
Upvotes: 1