How to Get Element Type of an Array Object?

  • Thread starter Thread starter Laser Lu
  • Start date Start date
L

Laser Lu

If I get an object with its type declared as Sysem.Array(not in the explicit
form like 'ElementType[]' in C#), then how to retrieve the exact element
type of that array?
 
If I get an object with its type declared as Sysem.Array(not in the explicit
form like 'ElementType[]' in C#), then how to retrieve the exact element
type of that array?

myArray.GetType().GetElementType()

Jon
 
Ok, thank you, Jon:)

Jon Skeet said:
If I get an object with its type declared as Sysem.Array(not in the
explicit
form like 'ElementType[]' in C#), then how to retrieve the exact element
type of that array?

myArray.GetType().GetElementType()

Jon
 
Back
Top