Currently I am doing the following to find an one dimensional array
type of a type -
Type asSingle;
Type asArray = Array.CreateInstance ( asSingle , 0 ).GetType ( );
Is there a way to do this without creating an instance?
I do not know the array type at design time.
Thanks in advance,
Gary
Chris Chilvers - 29 Jun 2006 01:07 GMT
>Currently I am doing the following to find an one dimensional array
>type of a type -
[quoted text clipped - 10 lines]
>
>Gary
What about (assuming .net 2):
asSingle.GetType().MakeArrayType();
gary - 29 Jun 2006 01:33 GMT
> >Currently I am doing the following to find an one dimensional array
> >type of a type -
[quoted text clipped - 14 lines]
>
> asSingle.GetType().MakeArrayType();
Superb. Thanks Chris.