Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating object from string variable
Message
 
To
24/10/2002 10:08:32
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00714844
Message ID:
00714949
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform