Which is best practice for creating an enum-like lookup for templates? I enjoy being able to bring up my templates with VS IntelliSense so either works for me.
Option 1 (enum
/Dictionary
combo):
public enum Template
{
AccountInformation = 1,
Registration = 2,
Signed = 3
}
static readonly IDictionary<Template, String> TemplateData = new Dictionary<Template, String>()
{
{Template.AccountInformation, "accountinfo.txt"},
{Template.Registration, "registration.txt"},
{Template.Signed, "signed.txt"}
};
Option 2 (static
class):
public static class Template
{
public static String AccountInformation = "accountinfo.txt";
public static String Registration = "registration.txt";
public static String Signed = "signed.txt";
}
static readonly IDictionary<>
\$\endgroup\$