J
Jeff Brown
Hi,
I have the following scenario. (The example code is C#.)
Type elementType = (given);
Type arrayType = (an array of whatever type "elementType" represents);
The question is, how do I get that value that's assigned to arrayType?
The following code works, but it seems kludgy, since it involves a string
parsing and lookup at runtime.
Type arrayType = Type.GetType(elementType.FullName + "[]");
Does anyone know of a better way?
Thanks,
Jeff Brown
I have the following scenario. (The example code is C#.)
Type elementType = (given);
Type arrayType = (an array of whatever type "elementType" represents);
The question is, how do I get that value that's assigned to arrayType?
The following code works, but it seems kludgy, since it involves a string
parsing and lookup at runtime.
Type arrayType = Type.GetType(elementType.FullName + "[]");
Does anyone know of a better way?
Thanks,
Jeff Brown