473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1326
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
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
by: hazz | last post by:
Is Activator.CreateInstance(t,BindingFlags.Public | BindingFlags.InvokeMethod | BindingFlags.CreateInstance, null, args, null) appropriate given the following; ...
3
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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
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
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,...

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.