Hi.
Almost every application have to write out some messages to the user.
The question is how to store them. For example, while programming for
Windows in C++ we could store these messages as string resource and
load them using LoadString API function. I'm quite new to C#, and the
best thing I've managed is creating private constant members of a
class. E. g.:
public class ExpandManager
{
....
#region Message declarations
private const string ERR_NOSUCHFILE = "File not found: ";
private const string ERR_EMPTY = "The selected workbook seems to be
empty.";
private const string ERR_LOCATECOL = "Couldn't locate the column
with area codes.";
private const string MSG_OPEN = "Opening source";
private const string MSG_CALCDIMS = "Obtaining ratelist
dimensions";
private const string MSG_PREPAREOUT = "Preparing output workbook";
private const string MSG_EXPAND = "Expanding code intervals";
#endregion
}
Isn't there an elegant way to solve this issue?
Thanks in advance
Martin