|
-
Oct 24th, 2005, 10:56 AM
#1
Thread Starter
Frenzied Member
need help with CreateObject equivalent in C#
I've tried CreateObject and it does not work in C#. So i tried:
Type t = Type.GetTypeFromProgID("MyObject.Class1");
Object o = Activator.CreateInstance(t);
This works to the point where it compiles and runs. However, when I try to use one of MyObject's methods, it gives me an error:
'object' does not contain a definition for 'MyFunction'
Any ideas on how to do this correctly?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|