.NET API Reference
Explore the .NET base class library and framework APIs.
System Namespace
Represents text as a sequence of characters.
public sealed class String : IComparable<string>, ICloneable, IList<char>, ICollection<char>, IEnumerable<char>, IEnumerable, IStructuralComparable, IStructuralEquatable
Methods:
Determines whether the specified string is null or an empty string ("").
public static bool IsNullOrEmpty(string value)
Parameters:
- value: stringThe string to test.
Returns:
- booltrue if the value parameter is null or an empty string (""); otherwise, false.
Replaces the format item in a string that is composed of zero or more specifiers. Each format item is replaced by the string representation of the corresponding argument.
public static string Format(string format, params object[] arg)
Parameters:
- format: stringA composite format string.
- arg: object[]An object array that contains zero or more objects to format.
Returns:
- stringA copy of format in which the format items have been replaced by their corresponding object replaced.
Provides access to the standard input, output, and error streams for console applications.
public static class Console
Methods:
Writes the specified string value to the standard output stream.
public static void WriteLine(string value)
Parameters:
- value: stringThe value to write.
System.Collections Namespace
Represents a strongly typed list of objects that can be accessed by index. Provides methods for creating, searching, and manipulating lists.
public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IReadOnlyList<T>, IReadOnlyCollection<T>
Methods:
Appends a default value to the end of the List<T>.
public void Add(T item)
Parameters:
- item: TThe object to be added to the end of the List<T>.
Removes the first occurrence of a specific object from the List<T>.
public bool Remove(T item)
Parameters:
- item: TThe object to remove from the List<T>.
Returns:
- booltrue if item is successfully removed from the List<T>; otherwise, false. This parameter further indicates that the List<T> contained item.
System.IO Namespace
Provides static methods for the creation, copying, deletion, moving, and opening of single files, and aids in the creation of FileStream objects.
public static class File
Methods:
Opens a text file, reads all lines of the file, and then closes the file.
public static string ReadAllText(string path)
Parameters:
- path: stringThe path to the file to read.
Returns:
- stringA string containing all the lines of the file.
System.Net Namespace
Specifies the status code of an HTTP response.
public enum HttpStatusCode
Members:
HTTP status 200. Indicates success.
HTTP status 404. Indicates that the requested resource was not found.
HTTP status 500. Indicates that the server encountered an unexpected condition.