static void Main(string[] args) { SampleClass outer = new SampleClass(); outer.SampleMethod(); SampleNamespace.SampleClass outer2 = new SampleNamespace.SampleClass(); outer2.SampleMethod(); NestedNamespace.SampleClass inner = new NestedNamespace.SampleClass(); inner.SampleMethod(); Console.ReadKey(); }
static void Main(string[] args) { // Displays "SampleMethod inside SampleNamespace." SampleClass outer = new SampleClass(); outer.SampleMethod(); // Displays "SampleMethod inside SampleNamespace." SampleNamespace.SampleClass outer2 = new SampleNamespace.SampleClass(); outer2.SampleMethod(); // Displays "SampleMethod inside NestedNamespace." NestedNamespace.SampleClass inner = new NestedNamespace.SampleClass(); inner.SampleMethod(); }
static void Main(string[] args) { SampleNamespace.SampleClass sample1 = new SampleNamespace.SampleClass(); SampleClass sample2 = new SampleClass(); }