Hi,
I have a class which defines and instantiates all my global
application level variables; for example,
namespace Constants
{
public sealed class UserActionIdAbb r
{
public static string[] Abbr = {"PEN","FIN","A CC","REJ","DEC" };
}
}
however I now wish to create a hashtable with default values already
assigned as do for the above string. I thought I'd get away with;
public static idictionary mydict = {"foo1","bar1", "foo2","bar 2"};
public static hashtable myhash = new hashtable(mydic t);
however this doesn't work. I want to avoid having to create my
hashtable and then assign key-pairs using the
myhash.add("foo 1","bar1");
Sure I can declare the hashtable table and assign values using
idictionary?
any help would be greatly appreciated.
I have a class which defines and instantiates all my global
application level variables; for example,
namespace Constants
{
public sealed class UserActionIdAbb r
{
public static string[] Abbr = {"PEN","FIN","A CC","REJ","DEC" };
}
}
however I now wish to create a hashtable with default values already
assigned as do for the above string. I thought I'd get away with;
public static idictionary mydict = {"foo1","bar1", "foo2","bar 2"};
public static hashtable myhash = new hashtable(mydic t);
however this doesn't work. I want to avoid having to create my
hashtable and then assign key-pairs using the
myhash.add("foo 1","bar1");
Sure I can declare the hashtable table and assign values using
idictionary?
any help would be greatly appreciated.