Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating object from string variable
Message
 
À
24/10/2002 10:08:32
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00714844
Message ID:
00714949
Vues:
14
>All,
>
>Is there any way to create an object from a string containing the object type name? That is:
>
>Dim x As String = "textbox"
>Dim y As TextBox
>
>y=New(x)

There was a typo in my previous reply
I meant
y = Activator.CreateInstance( Type.GetType(x))
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform