.NET API Reference
Explore the extensive .NET Base Class Library (BCL). This section provides detailed documentation for classes, methods, properties, and events across various .NET namespaces.
String Class
public sealed class String : IComparable<string>, ICloneable, IConvertible, IEnumerable<char>, IList<char>, ICollection<char>, IReadOnlyList<char>, IReadOnlyCollection<char>, IEquatable<string>
Represents text as a sequence of characters. The String class is a reference type, but because strings are immutable, instances of a String can be treated as if they were value types.
Methods
string.IsNullOrEmpty(string value)
public static bool IsNullOrEmpty(string value)
Indicates whether the specified string is null or an empty string ("").
string.Format(string format, params object[] arg)
public static string Format(string format, params object[] arg)
Replaces the format item in a specified string or a span of characters to their string representation using specified format, culture-specific formatting information, and argument list.
Int32 Struct
public struct Int32 : IComparable, IComparable<int>, IConvertible, IEquatable<int>
Represents a 32-bit signed integer.
Methods
int.Parse(string s)
public static int Parse(string s)
Converts the string representation of a number to its 32-bit signed integer equivalent.
int.TryParse(string s, out int result)
public static bool TryParse(string s, out int result)
Converts the string representation of a number to its 32-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed.
DateTime Struct
public struct DateTime : IComparable, IComparable<DateTime>, IConvertible, IEquatable<DateTime>
Represents an instant in time, typically expressed as a date and time of day.
Properties
DateTime.Now
public static DateTime Now { get; }
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
List<T> Class
public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
Represents a strongly typed list of objects that can be accessed by index. Provides methods for creating, searching, and manipulating lists.
Methods
List<T>.Add(T item)
public void Add(T item)
Adds an object to the end of the List<T>.
List<T>.Remove(T item)
public bool Remove(T item)
Removes the first occurrence of a specific object from the List<T>.
HttpClient Class
public class HttpClient : IDisposable
Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
Methods
HttpClient.GetAsync(string requestUri)
public Task<HttpResponseMessage> GetAsync(string requestUri)
Send a GET request to the specified Uri and handle the response headers as an asynchronous operation.
HttpClient.PostAsync(string requestUri, HttpContent content)
public Task<HttpResponseMessage> PostAsync(string requestUri, HttpContent content)
Send a POST request to the specified Uri and handle the response headers as an asynchronous operation.
Enumerable Class
public static class Enumerable
Supports the programming element that iterates through a collection and processes each element in the collection.
Extension Methods
IEnumerable<TSource>.Where<TSource>(Func<TSource, bool> predicate)
public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
Filters a sequence of values based on a predicate.
IEnumerable<TSource>.Select<TSource, TResult>(Func<TSource, TResult> selector)
public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
Projects each element of a sequence into a new form.