K
keith
I created a class libery which has name space Assembly
and class Assembly and compiled it.
Then created a C# project and called a method in
the external class
e.g.
Assembly dll;
dll=Assembly.LoadFrom(@"c:\app\Assembly.dll");
object obj=dll.CreateInstance("Assembly.Assembly");
obj.func();
When compiling, it said "'object' does not contain a
deifinition for 'func'
But if created a VB.NET project
e.g.
Dim dll As Assembly
dll = System.Reflection.Assembly.LoadFrom
("c:\app\Assembly.dll")
Dim obj As Object
obj = dll.CreateInstance("Assembly.Assembly")
obj.func()
I compiled and ran it without any problem.
Can you tell what is problem?
Thanks
and class Assembly and compiled it.
Then created a C# project and called a method in
the external class
e.g.
Assembly dll;
dll=Assembly.LoadFrom(@"c:\app\Assembly.dll");
object obj=dll.CreateInstance("Assembly.Assembly");
obj.func();
When compiling, it said "'object' does not contain a
deifinition for 'func'
But if created a VB.NET project
e.g.
Dim dll As Assembly
dll = System.Reflection.Assembly.LoadFrom
("c:\app\Assembly.dll")
Dim obj As Object
obj = dll.CreateInstance("Assembly.Assembly")
obj.func()
I compiled and ran it without any problem.
Can you tell what is problem?
Thanks