Hello,
I'm just trying to figure out how I want to do a few things that I am working on my custom source. I have run into two instances which a generic variable would have been a very handy.
I have tried doing something like the following in hopes to use a dictionary to contain this class as the value, but when defining the dictionary it wanted the type right then.
My question is, does anyone know of anything that will sort of achieve what I am trying to do? I'm trying to avoid writing multiple methods for the different types.
Please let me know if I didn't do a good job describing what I am trying to do.
Thanks
Greg.
I'm just trying to figure out how I want to do a few things that I am working on my custom source. I have run into two instances which a generic variable would have been a very handy.
I have tried doing something like the following in hopes to use a dictionary to contain this class as the value, but when defining the dictionary it wanted the type right then.
Code:
public class MyClass<T>
{
string Section;
string Key;
T Value;
}
Dictionary<string,MyClass<T>> Dic //Wanted me to define the type of class it would be.
Please let me know if I didn't do a good job describing what I am trying to do.
Thanks
Greg.