<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FLanguage_Basics%2FNamespace</id>
		<title>Csharp/CSharp Tutorial/Language Basics/Namespace - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FLanguage_Basics%2FNamespace"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Language_Basics/Namespace&amp;action=history"/>
		<updated>2026-04-29T17:29:19Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Language_Basics/Namespace&amp;diff=6524&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Language_Basics/Namespace&amp;diff=6524&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Language_Basics/Namespace&amp;diff=6525&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/Language_Basics/Namespace&amp;diff=6525&amp;oldid=prev"/>
				<updated>2010-05-26T12:19:19Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Creates a namespace with a single class==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
namespace StringSwitch&lt;br /&gt;
{&lt;br /&gt;
  class MySwitch &lt;br /&gt;
  {&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
////////////////////////////////////////////&lt;br /&gt;
using System;&lt;br /&gt;
using StringSwitch;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
  public static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    string localString;&lt;br /&gt;
    MySwitch s = new MySwitch();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declare a namespace==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;namespace Counter { &lt;br /&gt;
  class MyClass { &lt;br /&gt;
  } &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Demonstrate a namespace.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
namespace Counter { &lt;br /&gt;
  class MyClass { &lt;br /&gt;
  } &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
class MainClass { &lt;br /&gt;
  public static void Main() { &lt;br /&gt;
    Counter.MyClass my = new Counter.MyClass(); &lt;br /&gt;
  } &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Demonstrate the :: qualifier.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;  &lt;br /&gt;
  &lt;br /&gt;
using Counter; &lt;br /&gt;
using AnotherCounter; &lt;br /&gt;
 &lt;br /&gt;
// Give Counter an alias called Ctr. &lt;br /&gt;
using Ctr = Counter;  &lt;br /&gt;
  &lt;br /&gt;
namespace Counter {  &lt;br /&gt;
  class MyClass { &lt;br /&gt;
  }  &lt;br /&gt;
}  &lt;br /&gt;
 &lt;br /&gt;
namespace AnotherCounter {  &lt;br /&gt;
  class MyClass { &lt;br /&gt;
  } &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
class MainClass {  &lt;br /&gt;
  public static void Main() {  &lt;br /&gt;
 &lt;br /&gt;
    Ctr::MyClass m = new Ctr::MyClass();  &lt;br /&gt;
  }  &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Full qualify name==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the line&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;Console.WriteLine(&amp;quot;A simple C# program.&amp;quot;);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Namespace Introduction==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&amp;lt;LI&amp;gt;The namespace provides a way to keep one set of names separate from another.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;Names declared in one namespace will not conflict with the same names declared in another.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The namespace System is reserved for items in the .NET Framework class library.&amp;lt;/LI&amp;gt;&amp;lt;LI&amp;gt;The using keyword simply states that the program is using the names in the given namespace.&amp;lt;/LI&amp;gt;&amp;lt;/OL&amp;gt;&lt;br /&gt;
1.5.Namespace&lt;br /&gt;
1.5.1.&lt;br /&gt;
Namespace Introduction&lt;br /&gt;
1.5.2.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Fullqualifyname.htm&amp;quot;&amp;gt;Full qualify name&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.3.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Simplestnamespacewithclassdefinition.htm&amp;quot;&amp;gt;Simplest namespace with class definition&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.4.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Declareanamespace.htm&amp;quot;&amp;gt;Declare a namespace&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.5.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Demonstrateanamespace.htm&amp;quot;&amp;gt;Demonstrate a namespace.&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.6.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Usefullyqualifiedclassname.htm&amp;quot;&amp;gt;Use fully qualified class name&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.7.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/TwolevelsofNamespaces.htm&amp;quot;&amp;gt;Two levels of Namespaces&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.8.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Namespacewithdot.htm&amp;quot;&amp;gt;Namespace with dot&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.9.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Renamethenamespaces.htm&amp;quot;&amp;gt;Rename the namespaces&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.10.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Namespacespreventnameconflicts.htm&amp;quot;&amp;gt;Namespaces prevent name conflicts&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.11.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Namespacesareadditive.htm&amp;quot;&amp;gt;Namespaces are additive.&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.12.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Namespacescanbenested.htm&amp;quot;&amp;gt;Namespaces can be nested&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.13.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Demonstratethequalifier.htm&amp;quot;&amp;gt;Demonstrate the :: qualifier.&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.14.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Theuseoftwonamespaces.htm&amp;quot;&amp;gt;The use of two namespaces&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.15.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Theuseofnamespacehierarchies.htm&amp;quot;&amp;gt;The use of namespace hierarchies&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.16.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/Createsanamespacewithasingleclass.htm&amp;quot;&amp;gt;Creates a namespace with a single class&amp;lt;/a&amp;gt;&lt;br /&gt;
1.5.17.&lt;br /&gt;
&amp;lt;A href=&amp;quot;/Tutorial/CSharp/0020__Language-Basics/SameclassnameunderdifferentNamespaces.htm&amp;quot;&amp;gt;Same class name under different Namespaces&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Namespaces are additive.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
using Counter; &lt;br /&gt;
 &lt;br /&gt;
namespace Counter { &lt;br /&gt;
  class MyClass { &lt;br /&gt;
  } &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
namespace Counter { &lt;br /&gt;
  class MySecondClass { &lt;br /&gt;
  } &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
class MainClass { &lt;br /&gt;
  public static void Main() { &lt;br /&gt;
    MyClass m = new MyClass(); &lt;br /&gt;
    MySecondClass cu = new MySecondClass(); &lt;br /&gt;
  } &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Namespaces can be nested==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System; &lt;br /&gt;
 &lt;br /&gt;
namespace NS1 { &lt;br /&gt;
  class ClassA { &lt;br /&gt;
     public ClassA() { &lt;br /&gt;
       Console.WriteLine(&amp;quot;constructing ClassA&amp;quot;); &lt;br /&gt;
    } &lt;br /&gt;
  } &lt;br /&gt;
  namespace NS2 { // a nested namespace &lt;br /&gt;
    class ClassB { &lt;br /&gt;
       public ClassB() { &lt;br /&gt;
         Console.WriteLine(&amp;quot;constructing ClassB&amp;quot;); &lt;br /&gt;
      } &lt;br /&gt;
    } &lt;br /&gt;
  } &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
class MainClass { &lt;br /&gt;
  public static void Main() { &lt;br /&gt;
    NS1.ClassA a = new NS1.ClassA(); &lt;br /&gt;
 &lt;br /&gt;
    NS1.NS2.ClassB b = new NS1.NS2.ClassB();&lt;br /&gt;
  } &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;constructing ClassA&lt;br /&gt;
constructing ClassB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Namespaces prevent name conflicts==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;  &lt;br /&gt;
  &lt;br /&gt;
namespace Counter {  &lt;br /&gt;
  class MyClass {  &lt;br /&gt;
    public MyClass(){&lt;br /&gt;
      Console.WriteLine(&amp;quot;Counter1 namespace.&amp;quot;); &lt;br /&gt;
    }&lt;br /&gt;
  }  &lt;br /&gt;
}  &lt;br /&gt;
 &lt;br /&gt;
namespace Counter2 {  &lt;br /&gt;
  class MyClass { &lt;br /&gt;
    public MyClass() { &lt;br /&gt;
      Console.WriteLine(&amp;quot;Counter2 namespace.&amp;quot;); &lt;br /&gt;
    } &lt;br /&gt;
  } &lt;br /&gt;
} &lt;br /&gt;
 &lt;br /&gt;
class MainClass {  &lt;br /&gt;
  public static void Main() {  &lt;br /&gt;
    // This is CountDown in the Counter namespace. &lt;br /&gt;
    Counter.MyClass m1 = new Counter.MyClass();  &lt;br /&gt;
 &lt;br /&gt;
    // This is CountDown in the default namespace. &lt;br /&gt;
    Counter2.MyClass m2 = new Counter2.MyClass(); &lt;br /&gt;
 &lt;br /&gt;
  }  &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Counter1 namespace.&lt;br /&gt;
Counter2 namespace.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Namespace with dot==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;namespace Outer.Inner&lt;br /&gt;
{&lt;br /&gt;
    class MyClass&lt;br /&gt;
    {&lt;br /&gt;
        public static void Function() {}&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Rename the namespaces==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using ThatConsoleClass = System.Console;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        ThatConsoleClass.WriteLine(&amp;quot;Hello&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Hello&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Same class name under different Namespaces==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;     &lt;br /&gt;
namespace Foo {&lt;br /&gt;
  public class Money {&lt;br /&gt;
    public Money() {&lt;br /&gt;
    }&lt;br /&gt;
    public void Print( ) {&lt;br /&gt;
      Console.WriteLine(&amp;quot;Foo.Money.Print&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
namespace Bar {&lt;br /&gt;
  public class Money {&lt;br /&gt;
    public Money( ) {&lt;br /&gt;
    }&lt;br /&gt;
    public void Print( ) {&lt;br /&gt;
      Console.WriteLine(&amp;quot;Bar.Money.Print&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class MainClass {&lt;br /&gt;
  public static void Main( ) {&lt;br /&gt;
    Foo.Money fm = new Foo.Money();&lt;br /&gt;
    Bar.Money bm = new Bar.Money();&lt;br /&gt;
    fm.Print( );&lt;br /&gt;
    bm.Print( );&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Foo.Money.Print&lt;br /&gt;
Bar.Money.Print&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Simplest namespace with class definition==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A namespace is declared using the namespace keyword.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The general form of namespace is shown here:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;namespace name {&lt;br /&gt;
    // members&lt;br /&gt;
    }&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The use of namespace hierarchies==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;namespace CompanyName&lt;br /&gt;
{&lt;br /&gt;
  namespace UserInterface  // nested namespace&lt;br /&gt;
  {&lt;br /&gt;
    public class MyClass&lt;br /&gt;
    {&lt;br /&gt;
      public void Test()&lt;br /&gt;
      {&lt;br /&gt;
        System.Console.WriteLine(&amp;quot;UserInterface Test()&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
namespace CompanyName.DatabaseAccess  // nested namespace using dot&lt;br /&gt;
{&lt;br /&gt;
  public class MyClass&lt;br /&gt;
  {&lt;br /&gt;
    public void Test()&lt;br /&gt;
    {&lt;br /&gt;
      System.Console.WriteLine(&amp;quot;DatabaseAccess Test()&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class MainClass {&lt;br /&gt;
  public static void Main() {&lt;br /&gt;
    CompanyName.UserInterface.MyClass myUI = new CompanyName.UserInterface.MyClass();&lt;br /&gt;
    CompanyName.DatabaseAccess.MyClass myDB = new CompanyName.DatabaseAccess.MyClass();&lt;br /&gt;
    CompanyName.DatabaseAccess.MyClass myMT = new CompanyName.DatabaseAccess.MyClass();&lt;br /&gt;
    myUI.Test();&lt;br /&gt;
    myDB.Test();&lt;br /&gt;
    myMT.Test();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;UserInterface Test()&lt;br /&gt;
DatabaseAccess Test()&lt;br /&gt;
DatabaseAccess Test()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The use of two namespaces==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;namespace CompanyName&lt;br /&gt;
{&lt;br /&gt;
  public class Car&lt;br /&gt;
  {&lt;br /&gt;
    public string make;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
namespace DifferentCompany&lt;br /&gt;
{&lt;br /&gt;
  public class Car&lt;br /&gt;
  {&lt;br /&gt;
    public string make;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
  public static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    System.Console.WriteLine(&amp;quot;Creating a CompanyName.Car object&amp;quot;);&lt;br /&gt;
    CompanyName.Car myCar = new CompanyName.Car();&lt;br /&gt;
    myCar.make = &amp;quot;Toyota&amp;quot;;&lt;br /&gt;
    System.Console.WriteLine(&amp;quot;myCar.make = &amp;quot; + myCar.make);&lt;br /&gt;
    System.Console.WriteLine(&amp;quot;Creating a DifferentCompany.Car object&amp;quot;);&lt;br /&gt;
    DifferentCompany.Car myOtherCar = new DifferentCompany.Car();&lt;br /&gt;
    myOtherCar.make = &amp;quot;Porsche&amp;quot;;&lt;br /&gt;
    System.Console.WriteLine(&amp;quot;myOtherCar.make = &amp;quot; + myOtherCar.make);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Creating a CompanyName.Car object&lt;br /&gt;
myCar.make = Toyota&lt;br /&gt;
Creating a DifferentCompany.Car object&lt;br /&gt;
myOtherCar.make = Porsche&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Two levels of Namespaces==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;namespace Outer&lt;br /&gt;
{&lt;br /&gt;
    namespace Inner&lt;br /&gt;
    {&lt;br /&gt;
        class MyClass&lt;br /&gt;
        {&lt;br /&gt;
            public static void Function() {}&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use fully qualified class name==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;class Example { &lt;br /&gt;
 &lt;br /&gt;
  public static void Main() { &lt;br /&gt;
 &lt;br /&gt;
    // Console.WriteLine is fully qualified. &lt;br /&gt;
    System.Console.WriteLine(&amp;quot;A simple C# program.&amp;quot;); &lt;br /&gt;
  } &lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;A simple C# program.&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>