.NET API Reference
Welcome to the .NET API reference documentation. Explore the namespaces and types below to find information on classes, methods, properties, and more.
Classes
Classes
Classes
Classes
Classes
Classes
Object Class
The root of all types in the .NET Framework. Provides instance members that are available to all other types.
Public Methods
ToString()
Returns a string that represents the current object.
Equals(object obj)
Determines whether the specified object is equal to the current object.
GetHashCode()
Serves as the default hash function.
String Class
Represents text as a sequence of characters. Strings are immutable.
Public Methods
IsNullOrEmpty(string value)
Indicates whether the specified string is null
or an empty string (""
).
Contains(string value)
Returns a value indicating whether the specified System.String occurs within this string.
Replace(char oldChar, char newChar)
Returns a new string in which all occurrences of a specified character in this instance are replaced with another specified character.
Int32 Struct
Represents a 32-bit signed integer.
Public Methods
Parse(string s)
Converts the string representation of a number to its 32-bit signed integer equivalent.
Boolean Struct
Represents a Boolean value (true
or false
).
DateTime Struct
Represents an instance in time, typically expressed as a date and time of day.
Public Properties
Now
Gets a System.DateTime object that is set to the current date and time on this computer, expressed as the local time.
Exception Class
Represents errors that occur during execution.
Public Properties
Message
Gets the message that describes the current exception.
ArrayList Class
Represents a non-generic collection of objects that can be individually accessed by index.
List<T> Class
Represents a strongly typed list of objects that can be accessed by index. Provides methods for manipulating lists by adding, removing, searching, and sorting elements.
Public Methods
Add(T item)
Adds an object to the end of the System.Collections.Generic.List<T>.
Remove(T item)
Removes the first occurrence of a specific object from the System.Collections.Generic.List<T>.
Dictionary<TKey, TValue> Class
Represents a collection of key/value pairs that are organized by key.
Public Methods
Add(TKey key, TValue value)
Adds an element with the specified key and value to the dictionary.
ContainsKey(TKey key)
Determines whether the dictionary contains an element with the specified key.
File Class
Provides static methods for the creation, copying, deletion, moving, and opening of single files, and aids in their creation, deletion, and opening by System.IO.FileStream objects.
Public Methods
Exists(string path)
Determines whether the specified file exists.
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, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
Directory Class
Provides static methods for the creation, moving, and enumeration of directories and subdirectories.
Public Methods
Exists(string path)
Determines whether the given path refers to an existing directory on disk.
CreateDirectory(string path)
Creates all the directories and subdirectories in the specified path unless they already exist.
StreamReader Class
Implements a System.IO.TextReader that reads characters from a byte stream in a particular encoding.
StreamWriter Class
Implements a System.IO.TextWriter for writing characters to a stream in a particular encoding.
Enumerable Class
Provides extension methods for querying collections.
Public Methods
Where<TSource>(IEnumerable<TSource> source, Func<TSource, bool> predicate)
Filters a sequence of values based on a predicate.
Select<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, TResult> selector)
Projects each element of a sequence into a new form.
StringBuilder Class
Represents a mutable sequence of characters.
Public Methods
Append(string value)
Appends the string representation of the specified string to this instance.
ToString()
Converts to a System.String the sequence of characters in the current System.Text.StringBuilder.
Encoding Class
Represents a character encoding.
Public Properties
UTF8
Gets a System.Text.Encoding object that supports the UTF-8 code page.
IPAddress Class
Represents an Internet Protocol (IP) address.
EndPoint Class
Provides a base class for network endpoint classes.
HttpWebRequest Class
Sends an HTTP request to a Uniform Resource Identifier (URI) resource and receives a response from the resource.
WebClient Class
An object that sends data requests to and receives responses from a resource identified by a URI.
Public Methods
DownloadString(string address)
Downloads the resource with the specified URI to a local string.
Thread Class
Represents an instance of a managed execution thread.
Public Methods
Sleep(int millisecondsTimeout)
Suspends the current thread for the specified number of milliseconds.
CancellationTokenSource Class
Propagates a notification that operations should be canceled.
Public Methods
Cancel()
Notifies all waiting threads that the cancellation has been requested.