MSDN Documentation

System Namespace

The System namespace is the root namespace for fundamental classes in .NET. It provides base types, essential utility classes, and core functionality for applications.

Key Types

ClassPurpose
ObjectBase class for all .NET types.
StringImmutable text representation.
ArrayBase class for all arrays.
MathCommon mathematical functions.
ConsoleStandard input, output, and error streams.
DateTimeRepresent dates and times.
GuidGlobally unique identifier.

Sample: Using System.Console

// Example: A simple console greeting
using System;

class Program
{
    static void Main()
    {
        Console.WriteLine("Enter your name:");
        string name = Console.ReadLine();
        Console.WriteLine($"Hello, {name}! Welcome to .NET.");
    }
}

Related Namespaces