473,498 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Instance a class at runtime

Hi

I need to instance a class at runtime, at runtime a can get the name in a
string, i would like to know if its possible to instance the class at
runtime with the name in a string.

Thanks for your assistance.

Ernesto Díaz
Feb 23 '06 #1
3 1076
> I need to instance a class at runtime, at runtime a can get the name
in a string, i would like to know if its possible to instance the
class at runtime with the name in a string.


Check out the AppDomain.CreateInstance method.

Jim Wooley
Feb 23 '06 #2
Hi,

Check out this post for lots more information :

http://groups.google.com/group/micro...464798975beb0b

Regards,

Cerebrus.

Feb 23 '06 #3
"Ernesto Díaz" <je****@vianney.com.mx> schrieb:
I need to instance a class at runtime, at runtime a can get the name in a
string, i would like to know if its possible to instance the class at
runtime with the name in a string.


Check out the snippets at
<URL:http://dotnet.mvps.org/dotnet/code/techniques/#ClassByName>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
11410
by: kevin | last post by:
I have a form and in the form I have a sub that uses a class I instantiate using visual basic code: Public oCP As New Rs232 'instantiate the comm port I need to share this sub with...
2
1170
by: Gunner | last post by:
I am trying to create a generic form driven the database. I want to be able to run create Crystal reports from this genric page and only want to have to enter some info in the database and drop the...
3
1399
by: Peter Oliphant | last post by:
Trying to save/load a class instance to a file is tough. The reason is because there is no way to preserve its type other than by conventon. For eample, one can save all the states of the members...
2
883
by: Ernesto Díaz | last post by:
Hi I need to instance a class at runtime, at runtime a can get the name in a string, i would like to know if its possible to instance the class at runtime with the name in a string. Thanks...
4
1233
by: Ernesto Díaz | last post by:
Hi I need to instance a class at runtime, at runtime I can get the name in a string, i would like to know if its possible to instance the class at runtime with the name in a string. Thanks...
20
27725
by: Shawnk | last post by:
I would like to get the class INSTANCE name (not type name) of an 'object'. I can get the object (l_obj_ref.GetType()) and then get the (l_obj_typ.Name) for the class name. I there any way of...
2
2120
by: TEK | last post by:
Hello We're having a issue with a part of our app that is very strange, and I'm unable to see that it should be possible. We have: A collection (ActivityCollection) that is inherited from a...
16
2668
by: alexia.bee | last post by:
Hi all, In some weird reason, excel instance won;t die if i remove the comment from 4 lines of setting values into struct. here is a snipcode public...
4
3951
by: =?Utf-8?B?SmFzb24gUmV5bm9sZHM=?= | last post by:
(using .net 2.0) Say you have a class structure like this: class Address .... end class class Person FirstName
45
2959
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.