how do I reference a type?
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngvb' list.


Andy Smith
In the ArrayList.ToArray(Type) method, what is the easiest way to =
reference a type to an object that I don't have an instance of?

__
Andy Smith
Keyboard Jockey #3

Reply to this message...
 
    
Darren Neimke
Andy,

Try something like this...

[VB]
Dim myArray() As Int32 =3D CType( myArrayList.ToArray( GetType( Int32 ) =
),
Int32() )

[C#]
int[] myArray =3D ( int[] ) myArrayList.ToArray( typeof( int ) ) ;

-----Original Message-----
From: Andy Smith [mailto:Click here to reveal e-mail address]=20
Sent: Saturday, June 22, 2002 1:23 AM
To: aspngvb
Subject: [aspngvb] how do I reference a type?

In the ArrayList.ToArray(Type) method, what is the easiest way to
reference a type to an object that I don't have an instance of?

__
Andy Smith
Keyboard Jockey #3

| [aspngvb] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.asplists.com/asplists/aspngvb.asp =3D JOIN/QUIT

Reply to this message...
 
 
System.Collections.ArrayList




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com