Scottie,
You can do this, but not with this nomenclature. You will have to use
reflection, getting the Type of the generic type without type parameters,
and then getting the type instance of the type you want to use for the type
parameter (using the string and loading the type).
Once you have this, you can call MakeGenericType on the Type instance
representing the generic type, and then it will return a type instance that
represents the fully constructed type.
The problem with this is that you have to actually use reflection to
call the methods, since you don't know what it is exposing.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Scottie_do" <Sc*******@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
I'm considering switching to C# and using VS2005, but I'd like to know if
I
can have a list of values at runtime and then specify (at runtime) what
it's
value type is.
For example, I would have this in my Multi-Dimensional Array named
people[]
Then, I would then like to say:
new Person<People[index].ToString>();
Where ToString() would output a built in datatype or a struct/object that
I
defined at compiletime.
If this can be done I'd be curious about the syntax in C++/CLR