What is the best way to associate error messages with error codes in C#?
问题 I have a piece of software written in C#.NET that communicates with a device via USB. When a problem occurs the device sets an error code which is read by my software in the form of an integer. I want to store error messages in my C# program that correlate with the specific firmware error codes. What is the best way to store these? I have been told that a good approach would be to use a Resource file. What are the benefits of using a resource file? Is there a better way to do it? 回答1: I would