Hello,
I have a series of changing string IDs that are loaded dynamically a couple
times a minute. I need to associate each ID with a different static class so
later on in the app's lifecycle it knows which static class to use for
processing.
I've tried:
static class MyStaticObject
{
static public bool aValue = false;
}
static class test
{
static void Main(string[] args)
{
Dictionary<Stri ng, MyStaticObjecth older = new
Dictionary<Stri ng, MyStaticObject> ();
}
}
which generates this complie error:
static types cannot be used as generic arguments
I even tried:
Dictionary<Stri ng, ref MyStaticObjecth older = new Dictionary<Stri ng, ref
MyStaticObject> ();
TIA for getting helping approach this problem with a better approach.
M
I have a series of changing string IDs that are loaded dynamically a couple
times a minute. I need to associate each ID with a different static class so
later on in the app's lifecycle it knows which static class to use for
processing.
I've tried:
static class MyStaticObject
{
static public bool aValue = false;
}
static class test
{
static void Main(string[] args)
{
Dictionary<Stri ng, MyStaticObjecth older = new
Dictionary<Stri ng, MyStaticObject> ();
}
}
which generates this complie error:
static types cannot be used as generic arguments
I even tried:
Dictionary<Stri ng, ref MyStaticObjecth older = new Dictionary<Stri ng, ref
MyStaticObject> ();
TIA for getting helping approach this problem with a better approach.
M
Comment