C
caelis
Hi,
I've got a problem with referencing assemblies.
I reference an assembly in my programm; this assembly defines a method
"SayHello" in the class "Hello", namespace "MyNamespace". In my program
I define a method called "SayHello" in a class called "Hello",
namespace "MyNamespace", too. When I try to call the method
"MyNamespace.Hello.SayHello();" the C#-compiler outputs a warning since
it doesn't know whether to call the method defined in my programm or
the method defined in the referenced assembly (it chooses the method
defined in my programm by default, btw.).
With IL (MSIL) I got the possibility to choose myself which method to
call:
//Calls the method defined in my program
call void MyNamespace.Hello::SayHello()
//Calls the method defined in the referenced assembly
call void [externalAssembly] MyNamespace.Hello::SayHello()
Is something similar also possible with C#?
Thanks,
Simon
I've got a problem with referencing assemblies.
I reference an assembly in my programm; this assembly defines a method
"SayHello" in the class "Hello", namespace "MyNamespace". In my program
I define a method called "SayHello" in a class called "Hello",
namespace "MyNamespace", too. When I try to call the method
"MyNamespace.Hello.SayHello();" the C#-compiler outputs a warning since
it doesn't know whether to call the method defined in my programm or
the method defined in the referenced assembly (it chooses the method
defined in my programm by default, btw.).
With IL (MSIL) I got the possibility to choose myself which method to
call:
//Calls the method defined in my program
call void MyNamespace.Hello::SayHello()
//Calls the method defined in the referenced assembly
call void [externalAssembly] MyNamespace.Hello::SayHello()
Is something similar also possible with C#?
Thanks,
Simon