MSDN Documentation

Windows API Reference

.NET API Reference

Namespaces

Explore the vast .NET API by namespace.

Commonly Used Classes

System.String

Represents text as a sequence of characters.

The String class is a reference type that represents a sequence of characters. Although String is a reference type, strings are immutable.

public sealed class String : IComparable, ICloneable, IConvertible, IEnumerable, IList, ICollection, IEquatable

System.Console

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

The Console class provides methods for interacting with the console (standard input, output, and error streams).

public static class Console

Methods:
  • WriteLine(string value): Writes the specified data to the standard output stream.
  • ReadLine(): Reads the next line of characters from the standard input stream.

System.IO.File

Provides static methods and instance properties that allow the creation, copying, deletion, moving, and opening of files.

The File class provides static methods for creating, deleting, moving, and opening files, and aids in their creation.

public static class File

Methods:
  • ReadAllText(string path): Opens a text file, reads all lines of the file, and then closes the file.
  • WriteAllText(string path, string contents): Creates a new file or overwrites an existing file.

System Namespace

System.DateTime

Represents an instance of time.

public struct DateTime : IComparable, IFormattable, ISpanFormattable, IFormatProvider, IEquatable, IComparable

Properties:
  • Now: Gets the current date and time.
  • UtcNow: Gets the current Coordinated Universal Time (UTC) date and time.

System.Exception

Represents errors that occur during application execution.

[Serializable] public class Exception : _Exception

Properties:
  • Message: Gets an error message that explains the reason the exception occurred.
  • StackTrace: Gets a string that contains the names of the calling methods in the call stack, and the location of each call in the supplied call stack.

System.Collections Namespace

System.Collections.ArrayList

Represents a strongly typed list of objects that can be accessed by index.

[Serializable] [Collection(typeof(ArrayList.ArrayListEnumerator))] public class ArrayList : IList, ICollection, IEnumerable, ICloneable

System.IO Namespace

System.IO.Directory

Provides methods for creating, moving, and enumerating through directories and subdirectories.

public static class Directory

Methods:
  • CreateDirectory(string path): Creates all directories and subdirectories to the specified path.
  • GetFiles(string path): Returns the names of files (including their paths) in the specified directory.

System.Net Namespace

System.Net.Http.HttpClient

Sends an HTTP request, as an asynchronous operation, and receives an HTTP response from the server.

public class HttpClient : IDisposable

Methods:
  • GetAsync(string requestUri): Sends a GET request to the specified Uri as an asynchronous operation.
  • PostAsync(string requestUri, HttpContent content): Sends a POST request to the specified Uri as an asynchronous operation.

Microsoft.Win32 Namespace

Microsoft.Win32.Registry

Provides access to the Windows registry.

public static class Registry

Properties:
  • CurrentUser: Gets a handle to the HKEY_CURRENT_USER registry key.
  • LocalMachine: Gets a handle to the HKEY_LOCAL_MACHINE registry key.