J
jtougas
What is the way to the type of an array's elements?
Array a = new long[] { 1, 2, 3 };
Type t = a.GetType();
Console.WriteLine( t.FullName );
This will write "System.Int64[]", but is not what I'm looking for.
Rather I want the type of the array's elements, so "System.Int64". I
seem to remember something along the lines of "a.GetElementType()" but
I can 't find anyting of the sort anymore.
Cheers
Array a = new long[] { 1, 2, 3 };
Type t = a.GetType();
Console.WriteLine( t.FullName );
This will write "System.Int64[]", but is not what I'm looking for.
Rather I want the type of the array's elements, so "System.Int64". I
seem to remember something along the lines of "a.GetElementType()" but
I can 't find anyting of the sort anymore.
Cheers