Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Nested Namespace
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using NS1; using NS1.NS2; using System; namespace NS1 { class ClassA { public ClassA() { Console.WriteLine("constructing ClassA"); } } namespace NS2 { // a nested namespace class ClassB { public ClassB() { Console.WriteLine("constructing ClassB"); } } } } namespace Rextester { public class Program { public static void Main(string[] args) { //NS1.ClassA a = new NS1.ClassA(); ClassA a =new ClassA(); ClassB b =new ClassB(); // NS2.ClassB b = new NS2.ClassB(); // Error!!! NS2 is not in view // NS1.NS2.ClassB b = new NS1.NS2.ClassB(); // this is right } } }
run
|
edit
|
history
|
help
0
Test
Plt-D v.0.9.2
xpath select element code
Comparing hashing with different encoding and also transferring bytes
sdfghyjtgfredx
Decimal Test2
ttttt
Generics Base class constraints
Math 10.96
radix sort