Tuesday, June 28, 2011

Namespaces (C# Programming)

Namespaces have the following properties:
  • They organize large code projects.
  • They are delimited by using the . operator.
  • The using directive obviates the requirement to specify the name of the namespace for every class.
  • The global namespace is the "root" namespace: global::System will always refer to the .NET Framework namespace System.

    namespace SampleNamespace
    {
        class SampleClass
        {
            public void SampleMethod()
            {
                System.Console.WriteLine(
                  "SampleMethod inside SampleNamespace");
            }
        }
    }
     
     
     

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

LM Studio is a desktop application designed for developing and experimenting with large language models (LLMs) directly on your computer.

    LM Studio Overview LM Studio is a desktop application designed for developing and experimenting with large language models (LLMs...