- using System;
- using NS1;
- using NS2;
- namespace NS1
- {
- public class MyClass
- {
- public void Display()
- {
- Console.WriteLine("Display() Method of MyClass in NS1");
- }
- }
- }
- namespace NS2
- {
- public class MyClass1
- {
- public void Display()
- {
- Console.WriteLine("Display() Method of MyClass in NS2");
- }
- }
- }
- class UsingMyClass
- {
- public static void Main()
- {
- MyClass myObject = new MyClass();
- myObject.Display();
- }
- }
Answer:
Display() Method of MyClass in NS1