473,509 Members | 2,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type.InvokeClass vs. InvokeMethod...

I think invoke method is good. but it is not 'great'... I need a way to
invoke the class...

ex:

t = getType(myClass)
t.InvokeMethod(....)

That is if i don't know the method, but I know the class... what if i
don't even know the class...

ex:

t = getType("ClassName") '<-- ClassName is a class in this project.
t.InvokeMethod(....)

is that possible?

Jul 21 '05 #1
1 1331
tascien <ta******@ecoaches.com> wrote:
I think invoke method is good. but it is not 'great'... I need a way to
invoke the class...
There's no such concept as "invoking" a class. What exactly do you
mean?
ex:

t = getType(myClass)
t.InvokeMethod(....)

That is if i don't know the method, but I know the class...
Then what would you want to be invoked?
what if i don't even know the class...

ex:

t = getType("ClassName") '<-- ClassName is a class in this project.
t.InvokeMethod(....)

is that possible?


I think you're interested in Type.GetType here.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2

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

Similar topics

0
998
by: bandzuch martin | last post by:
hello! is there any way how to return custom type for specific class using typeof operator? //my custom type definition class CustomType : System.Type { ... implementation ...
3
5717
by: hazz | last post by:
Is Activator.CreateInstance(t,BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.CreateInstance, null, args, null) appropriate given the following; ...
3
3238
by: Bob Rundle | last post by:
I would like to get something like this to work... Type t = FindMyType(); // might be int, float, double, etc string s = "1233"; object v = t.Parse(s); This doesn't work of couse, Parse is...
6
768
by: Sameh Ahmed | last post by:
Hello there Anybody used Managementobject.invoke method? if yes how do u send method parameters? Thanks in advance Regards Sameh
1
1404
by: JS | last post by:
In my project, I am setting Options Strict on. In one place, I have generic code to set values in my objects using a configuration file, code which is trying to set properties of my classes using...
1
280
by: tascien | last post by:
I think invoke method is good. but it is not 'great'... I need a way to invoke the class... ex: t = getType(myClass) t.InvokeMethod(....) That is if i don't know the method, but I know the...
1
2238
by: Lenn | last post by:
Hello, Here's a little background. I have a function that calls a method of another assembly (COM Interop) dynamically through Reflection. It gets method name and array of values and calls...
2
5459
by: Lamis | last post by:
Hi, I need urgent help, this is my code to rename my hostName: (MY computer is not member of domain) string compName = System.Windows.Forms.SystemInformation.ComputerName.ToString();...
0
1467
by: Jan | last post by:
I just started using .NET Remoting. I have a test system (client) which connects to our device (server) running XP Embedded. When my server object is called it uses a library where reflection...
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
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...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
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
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
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.