> with Reflection API, I want to define a array of some type. if the type is
> defined in else assembly, I can get the array type by call Type.GetType(
[quoted text clipped - 3 lines]
>
> xiaorun huang
>> with Reflection API, I want to define a array of some type. if the
>> type is defined in else assembly, I can get the array type by call
[quoted text clipped - 6 lines]
> Maybe I am confused, You should be able to create a "Array" type use
> that to stuff the types. Maybe I am wrong..
you can use the static Method Array.CreateInstance
e.g.:
Array my3DArray=Array.CreateInstance( typeof(Object), 2, 3, 4 );
for ( int i = my3DArray.GetLowerBound(0); i <=
my3DArray.GetUpperBound(0); i++ )
for ( int j = my3DArray.GetLowerBound(1); j <=
my3DArray.GetUpperBound(1); j++ )
for ( int k = my3DArray.GetLowerBound(2); k <=
my3DArray.GetUpperBound(2); k++ )
my3DArray.SetValue( "abc" + i + j + k, i, j, k );

Signature
best regards
Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at
xiaorun huang - 16 Oct 2003 15:59 GMT
Thanks to you! but I am not to create a instance of array, but to get the
array's type to use in some Emit API.
Mattias has told me what i want!
xiaorun huang
> >> with Reflection API, I want to define a array of some type. if the
> >> type is defined in else assembly, I can get the array type by call
[quoted text clipped - 18 lines]
> my3DArray.GetUpperBound(2); k++ )
> my3DArray.SetValue( "abc" + i + j + k, i, j, k );
Yes! I want to create a "Arrary" type with element type is a type defining.
I have diffcult to express me full since english is not my mother language
:)!
Mattias has told me what i want!
xiaorun huang
> > with Reflection API, I want to define a array of some type. if the type is
> > defined in else assembly, I can get the array type by call Type.GetType(
[quoted text clipped - 6 lines]
> Maybe I am confused, You should be able to create a "Array" type use
> that to stuff the types. Maybe I am wrong..