ערוך

שתף באמצעות


String Class

Definition

Represents text as a sequence of UTF-16 code units.

public ref class System::String sealed : IComparable, IComparable<System::String ^>, IConvertible, IEquatable<System::String ^>, System::Collections::Generic::IEnumerable<char>
public ref class System::String sealed : ICloneable, IComparable, IComparable<System::String ^>, IConvertible, IEquatable<System::String ^>, System::Collections::Generic::IEnumerable<char>
public ref class System::String sealed : ICloneable, IComparable, IComparable<System::String ^>, IConvertible, IEquatable<System::String ^>, IParsable<System::String ^>, ISpanParsable<System::String ^>, System::Collections::Generic::IEnumerable<char>
public ref class System::String sealed : ICloneable, IComparable, IConvertible, System::Collections::IEnumerable
public ref class System::String sealed : IComparable, IComparable<System::String ^>, IEquatable<System::String ^>, System::Collections::IEnumerable
public ref class System::String sealed : IComparable, IComparable<System::String ^>, IEquatable<System::String ^>, System::Collections::Generic::IEnumerable<char>
public sealed class String : IComparable, IComparable<string>, IConvertible, IEquatable<string>, System.Collections.Generic.IEnumerable<char>
public sealed class String : ICloneable, IComparable, IComparable<string>, IConvertible, IEquatable<string>, System.Collections.Generic.IEnumerable<char>
public sealed class String : ICloneable, IComparable, IComparable<string>, IConvertible, IEquatable<string>, IParsable<string>, ISpanParsable<string>, System.Collections.Generic.IEnumerable<char>
[System.Serializable]
public sealed class String : ICloneable, IComparable, IConvertible, System.Collections.IEnumerable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class String : ICloneable, IComparable, IComparable<string>, IConvertible, IEquatable<string>, System.Collections.Generic.IEnumerable<char>
public sealed class String : IComparable, IComparable<string>, IEquatable<string>, System.Collections.IEnumerable
public sealed class String : IComparable, IComparable<string>, IEquatable<string>, System.Collections.Generic.IEnumerable<char>
type string = class
    interface seq<char>
    interface IEnumerable
    interface IComparable
    interface IComparable<string>
    interface IConvertible
    interface IEquatable<string>
type string = class
    interface seq<char>
    interface IEnumerable
    interface ICloneable
    interface IComparable
    interface IComparable<string>
    interface IConvertible
    interface IEquatable<string>
type string = class
    interface seq<char>
    interface IEnumerable
    interface ICloneable
    interface IComparable
    interface IComparable<string>
    interface IConvertible
    interface IEquatable<string>
    interface IParsable<string>
    interface ISpanParsable<string>
type string = class
    interface seq<char>
    interface IEnumerable
    interface IComparable
    interface IComparable<string>
    interface IConvertible
    interface IEquatable<string>
    interface ICloneable
[<System.Serializable>]
type string = class
    interface IComparable
    interface ICloneable
    interface IConvertible
    interface IEnumerable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type string = class
    interface IComparable
    interface ICloneable
    interface IConvertible
    interface IComparable<string>
    interface seq<char>
    interface IEnumerable
    interface IEquatable<string>
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type string = class
    interface IComparable
    interface ICloneable
    interface IConvertible
    interface IEnumerable
    interface IComparable<string>
    interface seq<char>
    interface IEquatable<string>
type string = class
    interface IEnumerable
    interface IComparable
    interface IComparable<string>
    interface IEquatable<string>
type string = class
    interface IComparable
    interface IComparable<string>
    interface IEquatable<string>
    interface seq<char>
    interface IEnumerable
Public NotInheritable Class String
Implements IComparable, IComparable(Of String), IConvertible, IEnumerable(Of Char), IEquatable(Of String)
Public NotInheritable Class String
Implements ICloneable, IComparable, IComparable(Of String), IConvertible, IEnumerable(Of Char), IEquatable(Of String)
Public NotInheritable Class String
Implements ICloneable, IComparable, IComparable(Of String), IConvertible, IEnumerable(Of Char), IEquatable(Of String), IParsable(Of String), ISpanParsable(Of String)
Public NotInheritable Class String
Implements ICloneable, IComparable, IConvertible, IEnumerable
Public NotInheritable Class String
Implements IComparable, IComparable(Of String), IEnumerable, IEquatable(Of String)
Public NotInheritable Class String
Implements IComparable, IComparable(Of String), IEnumerable(Of Char), IEquatable(Of String)
Inheritance
String
Attributes
Implements

Remarks

For more information about this API, see Supplemental API remarks for String.

Constructors

String(Char*)

Initializes a new instance of the String class to the value indicated by a specified pointer to an array of Unicode characters.

String(Char*, Int32, Int32)

Initializes a new instance of the String class to the value indicated by a specified pointer to an array of Unicode characters, a starting character position within that array, and a length.

String(Char, Int32)

Initializes a new instance of the String class to the value indicated by a specified Unicode character repeated a specified number of times.

String(Char[])

Initializes a new instance of the String class to the Unicode characters indicated in the specified character array.

String(Char[], Int32, Int32)

Initializes a new instance of the String class to the value indicated by an array of Unicode characters, a starting character position within that array, and a length.

String(ReadOnlySpan<Char>)

Initializes a new instance of the String class to the Unicode characters indicated in the specified read-only span.

String(SByte*)

Initializes a new instance of the String class to the value indicated by a pointer to an array of 8-bit signed integers.

String(SByte*, Int32, Int32)

Initializes a new instance of the String class to the value indicated by a specified pointer to an array of 8-bit signed integers, a starting position within that array, and a length.

String(SByte*, Int32, Int32, Encoding)

Initializes a new instance of the String class to the value indicated by a specified pointer to an array of 8-bit signed integers, a starting position within that array, a length, and an Encoding object.

Fields

Empty

Represents the empty string. This field is read-only.

Properties

Chars[Int32]

Gets the Char object at a specified position in the current String object.

Length

Gets the number of characters in the current String object.

Methods

Clone()

Returns a reference to this instance of String.

Compare(String, Int32, String, Int32, Int32)

Compares substrings of two specified String objects and returns an integer that indicates their relative position in the sort order.

Compare(String, Int32, String, Int32, Int32, Boolean)

Compares substrings of two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.

Compare(String, Int32, String, Int32, Int32, Boolean, CultureInfo)

Compares substrings of two specified String objects, ignoring or honoring their case and using culture-specific information to influence the comparison, and returns an integer that indicates their relative position in the sort order.

Compare(String, Int32, String, Int32, Int32, CultureInfo, CompareOptions)

Compares substrings of two specified String objects using the specified comparison options and culture-specific information to influence the comparison, and returns an integer that indicates the relationship of the two substrings to each other in the sort order.

Compare(String, Int32, String, Int32, Int32, StringComparison)

Compares substrings of two specified String objects using the specified rules, and returns an integer that indicates their relative position in the sort order.

Compare(String, String)

Compares two specified String objects and returns an integer that indicates their relative position in the sort order.

Compare(String, String, Boolean)

Compares two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.

Compare(String, String, Boolean, CultureInfo)

Compares two specified String objects, ignoring or honoring their case, and using culture-specific information to influence the comparison, and returns an integer that indicates their relative position in the sort order.

Compare(String, String, CultureInfo, CompareOptions)

Compares two specified String objects using the specified comparison options and culture-specific information to influence the comparison, and returns an integer that indicates the relationship of the two strings to each other in the sort order.

Compare(String, String, StringComparison)

Compares two specified String objects using the specified rules, and returns an integer that indicates their relative position in the sort order.

CompareOrdinal(String, Int32, String, Int32, Int32)

Compares substrings of two specified String objects by evaluating the numeric values of the corresponding Char objects in each substring.

CompareOrdinal(String, String)

Compares two specified String objects by evaluating the numeric values of the corresponding Char objects in each string.

CompareTo(Object)

Compares this instance with a specified Object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified Object.

CompareTo(String)

Compares this instance with a specified String object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified string.

Concat(IEnumerable<String>)

Concatenates the members of a constructed IEnumerable<T> collection of type String.

Concat(Object)

Creates the string representation of a specified object.

Concat(Object, Object)

Concatenates the string representations of two specified objects.

Concat(Object, Object, Object)

Concatenates the string representations of three specified objects.

Concat(Object, Object, Object, Object)

Concatenates the string representations of four specified objects and any objects specified in an optional variable length parameter list.

Concat(Object[])

Concatenates the string representations of the elements in a specified Object array.

Concat(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Concatenates the string representations of two specified read-only character spans.

Concat(ReadOnlySpan<Char>, ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Concatenates the string representations of three specified read-only character spans.

Concat(ReadOnlySpan<Char>, ReadOnlySpan<Char>, ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Concatenates the string representations of four specified read-only character spans.

Concat(ReadOnlySpan<Object>)

Concatenates the string representations of the elements in a specified span of objects.

Concat(ReadOnlySpan<String>)

Concatenates the elements of a specified span of String.

Concat(String, String)

Concatenates two specified instances of String.

Concat(String, String, String)

Concatenates three specified instances of String.

Concat(String, String, String, String)

Concatenates four specified instances of String.

Concat(String[])

Concatenates the elements of a specified String array.

Concat<T>(IEnumerable<T>)

Concatenates the members of an IEnumerable<T> implementation.

Contains(Char)

Returns a value indicating whether a specified character occurs within this string.

Contains(Char, StringComparison)

Returns a value indicating whether a specified character occurs within this string, using the specified comparison rules.

Contains(String)

Returns a value indicating whether a specified substring occurs within this string.

Contains(String, StringComparison)

Returns a value indicating whether a specified string occurs within this string, using the specified comparison rules.

Copy(String)
Obsolete.

Creates a new instance of String with the same value as a specified String.

CopyTo(Int32, Char[], Int32, Int32)

Copies a specified number of characters from a specified position in this instance to a specified position in an array of Unicode characters.

CopyTo(Span<Char>)

Copies the contents of this string into the destination span.

Create(IFormatProvider, DefaultInterpolatedStringHandler)

Creates a new string by using the specified provider to control the formatting of the specified interpolated string.

Create(IFormatProvider, Span<Char>, DefaultInterpolatedStringHandler)

Creates a new string by using the specified provider to control the formatting of the specified interpolated string.

Create<TState>(Int32, TState, SpanAction<Char,TState>)

Creates a new string with a specific length and initializes it after creation by using the specified callback.

EndsWith(Char)

Determines whether the end of this string instance matches the specified character.

EndsWith(String)

Determines whether the end of this string instance matches the specified string.

EndsWith(String, Boolean, CultureInfo)

Determines whether the end of this string instance matches the specified string when compared using the specified culture.

EndsWith(String, StringComparison)

Determines whether the end of this string instance matches the specified string when compared using the specified comparison option.

EnumerateRunes()

Returns an enumeration of Rune from this string.

Equals(Object)

Determines whether this instance and a specified object, which must also be a String object, have the same value.

Equals(String)

Determines whether this instance and another specified String object have the same value.

Equals(String, String)

Determines whether two specified String objects have the same value.

Equals(String, String, StringComparison)

Determines whether two specified String objects have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.

Equals(String, StringComparison)

Determines whether this string and a specified String object have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.

Format(IFormatProvider, CompositeFormat, Object[])

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format(IFormatProvider, CompositeFormat, ReadOnlySpan<Object>)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format(IFormatProvider, String, Object)

Replaces the format item or items in a specified string with the string representation of the corresponding object. A parameter supplies culture-specific formatting information.

Format(IFormatProvider, String, Object, Object)

Replaces the format items in a string with the string representation of two specified objects. A parameter supplies culture-specific formatting information.

Format(IFormatProvider, String, Object, Object, Object)

Replaces the format items in a string with the string representation of three specified objects. An parameter supplies culture-specific formatting information.

Format(IFormatProvider, String, Object[])

Replaces the format items in a string with the string representations of corresponding objects in a specified array. A parameter supplies culture-specific formatting information.

Format(IFormatProvider, String, ReadOnlySpan<Object>)

Replaces the format items in a string with the string representations of corresponding objects in a specified span. A parameter supplies culture-specific formatting information.

Format(String, Object)

Replaces one or more format items in a string with the string representation of a specified object.

Format(String, Object, Object)

Replaces the format items in a string with the string representation of two specified objects.

Format(String, Object, Object, Object)

Replaces the format items in a string with the string representation of three specified objects.

Format(String, Object[])

Replaces the format item in a specified string with the string representation of a corresponding object in a specified array.

Format(String, ReadOnlySpan<Object>)

Replaces the format item in a specified string with the string representation of a corresponding object in a specified span.

Format<TArg0,TArg1,TArg2>(IFormatProvider, CompositeFormat, TArg0, TArg1, TArg2)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format<TArg0,TArg1>(IFormatProvider, CompositeFormat, TArg0, TArg1)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

Format<TArg0>(IFormatProvider, CompositeFormat, TArg0)

Replaces the format item or items in a CompositeFormat with the string representation of the corresponding objects in the specified format.

GetEnumerator()

Retrieves an object that can iterate through the individual characters in this string.

GetHashCode()

Returns the hash code for this string.

GetHashCode(ReadOnlySpan<Char>)

Returns the hash code for the provided read-only character span.

GetHashCode(ReadOnlySpan<Char>, StringComparison)

Returns the hash code for the provided read-only character span using the specified rules.

GetHashCode(StringComparison)

Returns the hash code for this string using the specified rules.

GetPinnableReference()

Returns a reference to the element of the string at index zero.

This method is intended to support .NET compilers and is not intended to be called by user code.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetTypeCode()

Returns the TypeCode for the String class.

IndexOf(Char)

Reports the zero-based index of the first occurrence of the specified Unicode character in this string.

IndexOf(Char, Int32)

Reports the zero-based index of the first occurrence of the specified Unicode character in this string. The search starts at a specified character position.

IndexOf(Char, Int32, Int32)

Reports the zero-based index of the first occurrence of the specified character in this instance. The search starts at a specified character position and examines a specified number of character positions.

IndexOf(Char, StringComparison)

Reports the zero-based index of the first occurrence of the specified Unicode character in this string. A parameter specifies the type of search to use for the specified character.

IndexOf(String)

Reports the zero-based index of the first occurrence of the specified string in this instance.

IndexOf(String, Int32)

Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position.

IndexOf(String, Int32, Int32)

Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position and examines a specified number of character positions.

IndexOf(String, Int32, Int32, StringComparison)

Reports the zero-based index of the first occurrence of the specified string in the current String object. Parameters specify the starting search position in the current string, the number of characters in the current string to search, and the type of search to use for the specified string.

IndexOf(String, Int32, StringComparison)

Reports the zero-based index of the first occurrence of the specified string in the current String object. Parameters specify the starting search position in the current string and the type of search to use for the specified string.

IndexOf(String, StringComparison)

Reports the zero-based index of the first occurrence of the specified string in the current String object. A parameter specifies the type of search to use for the specified string.

IndexOfAny(Char[])

Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.

IndexOfAny(Char[], Int32)

Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position.

IndexOfAny(Char[], Int32, Int32)

Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position and examines a specified number of character positions.

Insert(Int32, String)

Returns a new string in which a specified string is inserted at a specified index position in this instance.

Intern(String)

Retrieves the system's reference to the specified String.

IsInterned(String)

Retrieves a reference to a specified String.

IsNormalized()

Indicates whether this string is in Unicode normalization form C.

IsNormalized(NormalizationForm)

Indicates whether this string is in the specified Unicode normalization form.

IsNullOrEmpty(String)

Indicates whether the specified string is null or an empty string ("").

IsNullOrWhiteSpace(String)

Indicates whether a specified string is null, empty, or consists only of white-space characters.

Join(Char, Object[])

Concatenates the string representations of an array of objects, using the specified separator between each member.

Join(Char, ReadOnlySpan<Object>)

Concatenates the string representations of a span of objects, using the specified separator between each member.

Join(Char, ReadOnlySpan<String>)

Concatenates a span of strings, using the specified separator between each member.

Join(Char, String[])

Concatenates an array of strings, using the specified separator between each member.

Join(Char, String[], Int32, Int32)

Concatenates an array of strings, using the specified separator between each member, starting with the element in value located at the startIndex position, and concatenating up to count elements.

Join(String, IEnumerable<String>)

Concatenates the members of a constructed IEnumerable<T> collection of type String, using the specified separator between each member.

Join(String, Object[])

Concatenates the elements of an object array, using the specified separator between each element.

Join(String, ReadOnlySpan<Object>)

Concatenates the string representations of a span of objects, using the specified separator between each member.

Join(String, ReadOnlySpan<String>)

Concatenates a span of strings, using the specified separator between each member.

Join(String, String[])

Concatenates all the elements of a string array, using the specified separator between each element.

Join(String, String[], Int32, Int32)

Concatenates the specified elements of a string array, using the specified separator between each element.

Join<T>(Char, IEnumerable<T>)

Concatenates the members of a collection, using the specified separator between each member.

Join<T>(String, IEnumerable<T>)

Concatenates the members of a collection, using the specified separator between each member.

LastIndexOf(Char)

Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance.

LastIndexOf(Char, Int32)

Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string.

LastIndexOf(Char, Int32, Int32)

Reports the zero-based index position of the last occurrence of the specified Unicode character in a substring within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.

LastIndexOf(String)

Reports the zero-based index position of the last occurrence of a specified string within this instance.

LastIndexOf(String, Int32)

Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string.

LastIndexOf(String, Int32, Int32)

Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.

LastIndexOf(String, Int32, Int32, StringComparison)

Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for the specified number of character positions. A parameter specifies the type of comparison to perform when searching for the specified string.

LastIndexOf(String, Int32, StringComparison)

Reports the zero-based index of the last occurrence of a specified string within the current String object. The search starts at a specified character position and proceeds backward toward the beginning of the string. A parameter specifies the type of comparison to perform when searching for the specified string.

LastIndexOf(String, StringComparison)

Reports the zero-based index of the last occurrence of a specified string within the current String object. A parameter specifies the type of search to use for the specified string.

LastIndexOfAny(Char[])

Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array.

LastIndexOfAny(Char[], Int32)

Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array. The search starts at a specified character position and proceeds backward toward the beginning of the string.

LastIndexOfAny(Char[], Int32, Int32)

Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Normalize()

Returns a new string whose textual value is the same as this string, but whose binary representation is in Unicode normalization form C.

Normalize(NormalizationForm)

Returns a new string whose textual value is the same as this string, but whose binary representation is in the specified Unicode normalization form.

PadLeft(Int32)

Returns a new string that right-aligns the characters in this instance by padding them with spaces on the left, for a specified total length.

PadLeft(Int32, Char)

Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a specified total length.

PadRight(Int32)

Returns a new string that left-aligns the characters in this string by padding them with spaces on the right, for a specified total length.

PadRight(Int32, Char)

Returns a new string that left-aligns the characters in this string by padding them on the right with a specified Unicode character, for a specified total length.

Remove(Int32)

Returns a new string in which all the characters in the current instance, beginning at a specified position and continuing through the last position, have been deleted.

Remove(Int32, Int32)

Returns a new string in which a specified number of characters in the current instance beginning at a specified position have been deleted.

Replace(Char, Char)

Returns a new string in which all occurrences of a specified Unicode character in this instance are replaced with another specified Unicode character.

Replace(String, String)

Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.

Replace(String, String, Boolean, CultureInfo)

Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string, using the provided culture and case sensitivity.

Replace(String, String, StringComparison)

Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string, using the provided comparison type.

ReplaceLineEndings()

Replaces all newline sequences in the current string with NewLine.

ReplaceLineEndings(String)

Replaces all newline sequences in the current string with replacementText.

Split(Char, Int32, StringSplitOptions)

Splits a string into a maximum number of substrings based on a specified delimiting character and, optionally, options. Splits a string into a maximum number of substrings based on the provided character separator, optionally omitting empty substrings from the result.

Split(Char, StringSplitOptions)

Splits a string into substrings based on a specified delimiting character and, optionally, options.

Split(Char[])

Splits a string into substrings based on specified delimiting characters.

Split(Char[], Int32)

Splits a string into a maximum number of substrings based on specified delimiting characters.

Split(Char[], Int32, StringSplitOptions)

Splits a string into a maximum number of substrings based on specified delimiting characters and, optionally, options.

Split(Char[], StringSplitOptions)

Splits a string into substrings based on specified delimiting characters and options.

Split(ReadOnlySpan<Char>)

Splits a string into substrings based on specified delimiting characters.

Split(String, Int32, StringSplitOptions)

Splits a string into a maximum number of substrings based on a specified delimiting string and, optionally, options.

Split(String, StringSplitOptions)

Splits a string into substrings that are based on the provided string separator.

Split(String[], Int32, StringSplitOptions)

Splits a string into a maximum number of substrings based on specified delimiting strings and, optionally, options.

Split(String[], StringSplitOptions)

Splits a string into substrings based on a specified delimiting string and, optionally, options.

StartsWith(Char)

Determines whether this string instance starts with the specified character.

StartsWith(String)

Determines whether the beginning of this string instance matches the specified string.

StartsWith(String, Boolean, CultureInfo)

Determines whether the beginning of this string instance matches the specified string when compared using the specified culture.

StartsWith(String, StringComparison)

Determines whether the beginning of this string instance matches the specified string when compared using the specified comparison option.

Substring(Int32)

Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.

Substring(Int32, Int32)

Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.

ToCharArray()

Copies the characters in this instance to a Unicode character array.

ToCharArray(Int32, Int32)

Copies the characters in a specified substring in this instance to a Unicode character array.

ToLower()

Returns a copy of this string converted to lowercase.

ToLower(CultureInfo)

Returns a copy of this string converted to lowercase, using the casing rules of the specified culture.

ToLowerInvariant()

Returns a copy of this String object converted to lowercase using the casing rules of the invariant culture.

ToString()

Returns this instance of String; no actual conversion is performed.

ToString(IFormatProvider)

Returns this instance of String; no actual conversion is performed.

ToUpper()

Returns a copy of this string converted to uppercase.

ToUpper(CultureInfo)

Returns a copy of this string converted to uppercase, using the casing rules of the specified culture.

ToUpperInvariant()

Returns a copy of this String object converted to uppercase using the casing rules of the invariant culture.

Trim()

Removes all leading and trailing white-space characters from the current string.

Trim(Char)

Removes all leading and trailing instances of a character from the current string.

Trim(Char[])

Removes all leading and trailing occurrences of a set of characters specified in an array from the current string.

Trim(ReadOnlySpan<Char>)

Removes all leading and trailing occurrences of a set of characters specified in a span from the current string.

TrimEnd()

Removes all the trailing white-space characters from the current string.

TrimEnd(Char)

Removes all the trailing occurrences of a character from the current string.

TrimEnd(Char[])

Removes all the trailing occurrences of a set of characters specified in an array from the current string.

TrimEnd(ReadOnlySpan<Char>)

Removes all the trailing occurrences of a set of characters specified in a span from the current string.

TrimStart()

Removes all the leading white-space characters from the current string.

TrimStart(Char)

Removes all the leading occurrences of a specified character from the current string.

TrimStart(Char[])

Removes all the leading occurrences of a set of characters specified in an array from the current string.

TrimStart(ReadOnlySpan<Char>)

Removes all the leading occurrences of a set of characters specified in a span from the current string.

TryCopyTo(Span<Char>)

Copies the contents of this string into the destination span.

Operators

Equality(String, String)

Determines whether two specified strings have the same value.

Implicit(String to ReadOnlySpan<Char>)

Defines an implicit conversion of a given string to a read-only span of characters.

Inequality(String, String)

Determines whether two specified strings have different values.

Explicit Interface Implementations

IComparable.CompareTo(Object)

Compares this instance with a specified Object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified Object.

IConvertible.GetTypeCode()

Returns the TypeCode for the String class.

IConvertible.ToBoolean(IFormatProvider)

For a description of this member, see ToBoolean(IFormatProvider).

IConvertible.ToByte(IFormatProvider)

For a description of this member, see ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

For a description of this member, see ToChar(IFormatProvider).

IConvertible.ToDateTime(IFormatProvider)

For a description of this member, see ToDateTime(IFormatProvider).

IConvertible.ToDecimal(IFormatProvider)

For a description of this member, see ToDecimal(IFormatProvider).

IConvertible.ToDouble(IFormatProvider)

For a description of this member, see ToDouble(IFormatProvider).

IConvertible.ToInt16(IFormatProvider)

For a description of this member, see ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

For a description of this member, see ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

For a description of this member, see ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

For a description of this member, see ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

For a description of this member, see ToSingle(IFormatProvider).

IConvertible.ToString(IFormatProvider)

For a description of this member, see ToString(IFormatProvider).

IConvertible.ToType(Type, IFormatProvider)

For a description of this member, see ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

For a description of this member, see ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

For a description of this member, see ToUInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

For a description of this member, see ToUInt64(IFormatProvider).

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through the current String object.

IEnumerable<Char>.GetEnumerator()

Returns an enumerator that iterates through the current String object.

IParsable<String>.Parse(String, IFormatProvider)

Parses a string into a value.

IParsable<String>.TryParse(String, IFormatProvider, String)
ISpanParsable<String>.Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.

ISpanParsable<String>.TryParse(ReadOnlySpan<Char>, IFormatProvider, String)

Extension Methods

ToFrozenDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Creates a FrozenDictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector function.

ToFrozenDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Creates a FrozenDictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector and element selector functions.

ToFrozenSet<T>(IEnumerable<T>, IEqualityComparer<T>)

Creates a FrozenSet<T> with the specified values.

ToImmutableArray<TSource>(IEnumerable<TSource>)

Creates an immutable array from the specified collection.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys.

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Constructs an immutable dictionary based on some transformation of a sequence.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

Enumerates and transforms a sequence, and produces an immutable dictionary of its contents.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer.

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers.

ToImmutableHashSet<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable hash set of its contents.

ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.

ToImmutableList<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable list of its contents.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer.

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers.

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

Enumerates a sequence and produces an immutable sorted set of its contents.

ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>)

Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer.

CopyToDataTable<T>(IEnumerable<T>)

Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>)

Applies an accumulator function over a sequence.

Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>)

Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.

Aggregate<TSource,TAccumulate,TResult>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate,TResult>)

Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.

AggregateBy<TSource,TKey,TAccumulate>(IEnumerable<TSource>, Func<TSource, TKey>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)

Applies an accumulator function over a sequence, grouping results by key.

AggregateBy<TSource,TKey,TAccumulate>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TKey,TAccumulate>, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)

Applies an accumulator function over a sequence, grouping results by key.

All<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Determines whether all elements of a sequence satisfy a condition.

Any<TSource>(IEnumerable<TSource>)

Determines whether a sequence contains any elements.

Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Determines whether any element of a sequence satisfies a condition.

Append<TSource>(IEnumerable<TSource>, TSource)

Appends a value to the end of the sequence.

AsEnumerable<TSource>(IEnumerable<TSource>)

Returns the input typed as IEnumerable<T>.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.

Average<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

Chunk<TSource>(IEnumerable<TSource>, Int32)

Splits the elements of a sequence into chunks of size at most size.

Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

Concatenates two sequences.

Contains<TSource>(IEnumerable<TSource>, TSource)

Determines whether a sequence contains a specified element by using the default equality comparer.

Contains<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>)

Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>.

Count<TSource>(IEnumerable<TSource>)

Returns the number of elements in a sequence.

Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns a number that represents how many elements in the specified sequence satisfy a condition.

CountBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Returns the count of elements in the source sequence grouped by key.

DefaultIfEmpty<TSource>(IEnumerable<TSource>)

Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.

DefaultIfEmpty<TSource>(IEnumerable<TSource>, TSource)

Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.

Distinct<TSource>(IEnumerable<TSource>)

Returns distinct elements from a sequence by using the default equality comparer to compare values.

Distinct<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values.

DistinctBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Returns distinct elements from a sequence according to a specified key selector function.

DistinctBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Returns distinct elements from a sequence according to a specified key selector function and using a specified comparer to compare keys.

ElementAt<TSource>(IEnumerable<TSource>, Index)

Returns the element at a specified index in a sequence.

ElementAt<TSource>(IEnumerable<TSource>, Int32)

Returns the element at a specified index in a sequence.

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Index)

Returns the element at a specified index in a sequence or a default value if the index is out of range.

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32)

Returns the element at a specified index in a sequence or a default value if the index is out of range.

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

Produces the set difference of two sequences by using the default equality comparer to compare values.

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values.

ExceptBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>)

Produces the set difference of two sequences according to a specified key selector function.

ExceptBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Produces the set difference of two sequences according to a specified key selector function.

First<TSource>(IEnumerable<TSource>)

Returns the first element of a sequence.

First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns the first element in a sequence that satisfies a specified condition.

FirstOrDefault<TSource>(IEnumerable<TSource>)

Returns the first element of a sequence, or a default value if the sequence contains no elements.

FirstOrDefault<TSource>(IEnumerable<TSource>, TSource)

Returns the first element of a sequence, or a specified default value if the sequence contains no elements.

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

Returns the first element of the sequence that satisfies a condition, or a specified default value if no such element is found.

GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Groups the elements of a sequence according to a specified key selector function.

GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a key selector function. The keys are compared by using a comparer and each group's elements are projected by using a specified function.

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The keys are compared by using a specified comparer.

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function.

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>, TResult>, IEqualityComparer<TKey>)

Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function.

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>)

Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys.

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>, IEqualityComparer<TKey>)

Correlates the elements of two sequences based on key equality and groups the results. A specified IEqualityComparer<T> is used to compare keys.

Index<TSource>(IEnumerable<TSource>)

Returns an enumerable that incorporates the element's index into a tuple.

Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

Produces the set intersection of two sequences by using the default equality comparer to compare values.

Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Produces the set intersection of two sequences by using the specified IEqualityComparer<T> to compare values.

IntersectBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>)

Produces the set intersection of two sequences according to a specified key selector function.

IntersectBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Produces the set intersection of two sequences according to a specified key selector function.

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

Correlates the elements of two sequences based on matching keys. A specified IEqualityComparer<T> is used to compare keys.

Last<TSource>(IEnumerable<TSource>)

Returns the last element of a sequence.

Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns the last element of a sequence that satisfies a specified condition.

LastOrDefault<TSource>(IEnumerable<TSource>)

Returns the last element of a sequence, or a default value if the sequence contains no elements.

LastOrDefault<TSource>(IEnumerable<TSource>, TSource)

Returns the last element of a sequence, or a specified default value if the sequence contains no elements.

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

Returns the last element of a sequence that satisfies a condition, or a specified default value if no such element is found.

LongCount<TSource>(IEnumerable<TSource>)

Returns an Int64 that represents the total number of elements in a sequence.

LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns an Int64 that represents how many elements in a sequence satisfy a condition.

Max<TSource>(IEnumerable<TSource>)

Returns the maximum value in a generic sequence.

Max<TSource>(IEnumerable<TSource>, IComparer<TSource>)

Returns the maximum value in a generic sequence.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

Invokes a transform function on each element of a sequence and returns the maximum Decimal value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

Invokes a transform function on each element of a sequence and returns the maximum Double value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

Invokes a transform function on each element of a sequence and returns the maximum Int32 value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

Invokes a transform function on each element of a sequence and returns the maximum Int64 value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

Invokes a transform function on each element of a sequence and returns the maximum nullable Decimal value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

Invokes a transform function on each element of a sequence and returns the maximum nullable Double value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

Invokes a transform function on each element of a sequence and returns the maximum nullable Int32 value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

Invokes a transform function on each element of a sequence and returns the maximum nullable Int64 value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

Invokes a transform function on each element of a sequence and returns the maximum nullable Single value.

Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

Invokes a transform function on each element of a sequence and returns the maximum Single value.

Max<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

Invokes a transform function on each element of a generic sequence and returns the maximum resulting value.

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Returns the maximum value in a generic sequence according to a specified key selector function.

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

Returns the maximum value in a generic sequence according to a specified key selector function and key comparer.

Min<TSource>(IEnumerable<TSource>)

Returns the minimum value in a generic sequence.

Min<TSource>(IEnumerable<TSource>, IComparer<TSource>)

Returns the minimum value in a generic sequence.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

Invokes a transform function on each element of a sequence and returns the minimum Decimal value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

Invokes a transform function on each element of a sequence and returns the minimum Double value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

Invokes a transform function on each element of a sequence and returns the minimum Int32 value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

Invokes a transform function on each element of a sequence and returns the minimum Int64 value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

Invokes a transform function on each element of a sequence and returns the minimum nullable Decimal value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

Invokes a transform function on each element of a sequence and returns the minimum nullable Double value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

Invokes a transform function on each element of a sequence and returns the minimum nullable Int32 value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

Invokes a transform function on each element of a sequence and returns the minimum nullable Int64 value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

Invokes a transform function on each element of a sequence and returns the minimum nullable Single value.

Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

Invokes a transform function on each element of a sequence and returns the minimum Single value.

Min<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

Invokes a transform function on each element of a generic sequence and returns the minimum resulting value.

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Returns the minimum value in a generic sequence according to a specified key selector function.

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

Returns the minimum value in a generic sequence according to a specified key selector function and key comparer.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

Order<T>(IEnumerable<T>)

Sorts the elements of a sequence in ascending order.

Order<T>(IEnumerable<T>, IComparer<T>)

Sorts the elements of a sequence in ascending order.

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Sorts the elements of a sequence in ascending order according to a key.

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

Sorts the elements of a sequence in ascending order by using a specified comparer.

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Sorts the elements of a sequence in descending order according to a key.

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

Sorts the elements of a sequence in descending order by using a specified comparer.

OrderDescending<T>(IEnumerable<T>)

Sorts the elements of a sequence in descending order.

OrderDescending<T>(IEnumerable<T>, IComparer<T>)

Sorts the elements of a sequence in descending order.

Prepend<TSource>(IEnumerable<TSource>, TSource)

Adds a value to the beginning of the sequence.

Reverse<TSource>(IEnumerable<TSource>)

Inverts the order of the elements in a sequence.

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

Projects each element of a sequence into a new form.

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>)

Projects each element of a sequence into a new form by incorporating the element's index.

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>)

Projects each element of a sequence to an IEnumerable<T> and flattens the resulting sequences into one sequence.

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>)

Projects each element of a sequence to an IEnumerable<T>, and flattens the resulting sequences into one sequence. The index of each source element is used in the projected form of that element.

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein.

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. The index of each source element is used in the intermediate projected form of that element.

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type.

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer<T>.

Single<TSource>(IEnumerable<TSource>)

Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.

Single<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.

SingleOrDefault<TSource>(IEnumerable<TSource>)

Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.

SingleOrDefault<TSource>(IEnumerable<TSource>, TSource)

Returns the only element of a sequence, or a specified default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

Returns the only element of a sequence that satisfies a specified condition, or a specified default value if no such element exists; this method throws an exception if more than one element satisfies the condition.

Skip<TSource>(IEnumerable<TSource>, Int32)

Bypasses a specified number of elements in a sequence and then returns the remaining elements.

SkipLast<TSource>(IEnumerable<TSource>, Int32)

Returns a new enumerable collection that contains the elements from source with the last count elements of the source collection omitted.

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

Computes the sum of the sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

Computes the sum of the sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

Computes the sum of the sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

Computes the sum of the sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

Computes the sum of the sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

Computes the sum of the sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

Computes the sum of the sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

Computes the sum of the sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

Computes the sum of the sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

Computes the sum of the sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.

Take<TSource>(IEnumerable<TSource>, Int32)

Returns a specified number of contiguous elements from the start of a sequence.

Take<TSource>(IEnumerable<TSource>, Range)

Returns a specified range of contiguous elements from a sequence.

TakeLast<TSource>(IEnumerable<TSource>, Int32)

Returns a new enumerable collection that contains the last count elements from source.

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Returns elements from a sequence as long as a specified condition is true.

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function.

ToArray<TSource>(IEnumerable<TSource>)

Creates an array from a IEnumerable<T>.

ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function.

ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function and key comparer.

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector and element selector functions.

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function, a comparer, and an element selector function.

ToHashSet<TSource>(IEnumerable<TSource>)

Creates a HashSet<T> from an IEnumerable<T>.

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

Creates a HashSet<T> from an IEnumerable<T> using the comparer to compare keys.

ToList<TSource>(IEnumerable<TSource>)

Creates a List<T> from an IEnumerable<T>.

ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function.

ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function and key comparer.

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to specified key selector and element selector functions.

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function, a comparer and an element selector function.

TryGetNonEnumeratedCount<TSource>(IEnumerable<TSource>, Int32)

Attempts to determine the number of elements in a sequence without forcing an enumeration.

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

Produces the set union of two sequences by using the default equality comparer.

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Produces the set union of two sequences by using a specified IEqualityComparer<T>.

UnionBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource,TKey>)

Produces the set union of two sequences according to a specified key selector function.

UnionBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Produces the set union of two sequences according to a specified key selector function.

Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

Filters a sequence of values based on a predicate.

Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.

Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>)

Produces a sequence of tuples with elements from the two specified sequences.

Zip<TFirst,TSecond,TThird>(IEnumerable<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>)

Produces a sequence of tuples with elements from the three specified sequences.

Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsParallel<TSource>(IEnumerable<TSource>)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

AsQueryable<TElement>(IEnumerable<TElement>)

Converts a generic IEnumerable<T> to a generic IQueryable<T>.

AsMemory(String)

Creates a new ReadOnlyMemory<Char> over the portion of the target string.

AsMemory(String, Index)

Creates a new ReadOnlyMemory<Char> over a portion of the target string starting at a specified index.

AsMemory(String, Int32)

Creates a new ReadOnlyMemory<Char> over a portion of the target string starting at a specified character position.

AsMemory(String, Int32, Int32)

Creates a new ReadOnlyMemory<Char> over a portion of the target string beginning at a specified position with a length.

AsMemory(String, Range)

Creates a new ReadOnlyMemory<Char> over a specified range of the target string.

AsSpan(String)

Creates a new read-only span over a string.

AsSpan(String, Index)

Creates a new ReadOnlySpan<T> over a portion of the target string from a specified position to the end of the string.

AsSpan(String, Int32)

Creates a new read-only span over a portion of the target string from a specified position to the end of the string.

AsSpan(String, Int32, Int32)

Creates a new read-only span over a portion of the target string from a specified position for a specified number of characters.

AsSpan(String, Range)

Creates a new ReadOnlySpan<T> over a portion of a target string using the range start and end indexes.

IsNormalized(String)

Indicates whether the specified string is in Unicode normalization form C.

IsNormalized(String, NormalizationForm)

Indicates whether a string is in a specified Unicode normalization form.

Normalize(String)

Normalizes a string to a Unicode normalization form C.

Normalize(String, NormalizationForm)

Normalizes a string to the specified Unicode normalization form.

Ancestors<T>(IEnumerable<T>)

Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

Removes every node in the source collection from its parent node.

Applies to

Thread Safety

This type is thread safe.

See also