API Reference - System Namespace

The System namespace contains fundamental classes and base types that define NET Framework functionality. This namespace is the root of the .NET class hierarchy and is available to all code written in .NET.

Classes

Interfaces


Class Object

Provides functionality for all classes: the base class of all types in the .NET Framework.

public abstract sealed class Object

Methods

ToString()

Returns a string that represents the current object.

public virtual string ToString()

Equals(Object obj)

Determines whether the specified object is equal to the current object.

public virtual bool Equals(object obj)

Class String

Represents text as a sequence of UTF-16 code units. The String class is an immutable type, which means that once an object of the String class is created, you cannot change its value.

public sealed class String : ICloneable, IComparable, IConvertible, IComparable<string>, IEnumerable<char>, IEnumerable

Properties

Length

Gets the number of characters in the current String object.

public int Length { get; }

Methods

Concat(String str0, String str1)

Concatenates the string representation of the values of two specified String objects.

public static string Concat(string str0, string str1)

Class Exception

Represents errors that occur during execution. This is the base class for all exception classes.

public abstract class Exception : _Exception, IDataErrorInfo, ISerializable

Properties

Message

Gets a message that describes the current exception.

public virtual string Message { get; }

Struct Int32

Represents a 32-bit signed integer.

public struct Int32 : IComparable, IComparable<int>, IConvertible, IEqualityComparer<int>, IEquatable<int>

Struct Boolean

Represents a Boolean value (true or false).

public struct Boolean : IComparable, IComparable<bool>, IConvertible, IEqualityComparer<bool>, IEquatable<bool>

Struct DateTime

Represents an instance in time, expressed as a date and time of day.

public struct DateTime : IComparable, IComparable<DateTime>, IConvertible, IEquatable<DateTime>

Struct Guid

Represents a globally unique identifier (GUID).

public struct Guid : IComparable, IComparable<Guid>, IConvertible, IEquatable<Guid>

Class Console

Provides access to the standard input, output, and error streams for console applications.

public sealed class Console

Methods

WriteLine(String value)

Writes the specified string value, followed by the current line terminator, to the standard output stream.

public static void WriteLine(string value)

Class Math

Provides fundamental mathematical operations and constants.

public sealed class Math

Fields

PI

Represents the ratio of the circumference of a circle to its diameter, specified as π.

public const double PI

Methods

Sin(Double a)

Returns the sine of the specified angle.

public static double Sin(double a)

Class Type

Provides information about the number, order, and attributes of members of a type. It is used for reflection.

public sealed class Type : _Type, ICloneable, IRuntimeTypeInfo, ITypeInfo

Interface IDisposable

Provides a mechanism for releasing unmanaged resources.

public interface IDisposable

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

void Dispose()

Interface IEnumerable

Exposes the enumerator, which supports a simple iteration over a non-generic collection.

public interface IEnumerable

Methods

GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerator GetEnumerator()

Interface IComparable

Represents the ability to compare the current object with another object of the same type.

public interface IComparable

Methods

CompareTo(Object obj)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

int CompareTo(object obj)

Interface ISerializable

Enables a class to save and restore its own state.

public interface ISerializable

Methods

GetObjectData(SerializationInfo info, StreamingContext context)

Populates a SerializationInfo object with the data required to serialize the object.

void GetObjectData(SerializationInfo info, StreamingContext context)