I have years of experience in C++ and Java, but I am new to C#.
Recently when I was reading a book on C#, they address the following as name spaces, which I found it wierd. According to my knowledge in C++, these are actually pre-processor directives.
using System; //A book called these as namespace using System.Collections.Generic; //A book called these as namespace using System.Text; //A book called these as namespace And according to the msdn website, the above are known as directives.
If the above is call namespace
What about the following?
namespace My_First_Program //This is also call namespace { class Program { static void Main() } } So my first question is: Which exactly is the namespace? Am I correct to call using System; as pre-processor directive?
My second question is: Can I assumenamespace My_First_Program works similar to using namespace std in C++ ?
namespace.namespace My_First_Program{}is a namespace definition andusing System;imports the namespace.