String Members
.NET Framework 3.5
Represents text as a series of Unicode characters.
The String type exposes the following members.
| Name | Description | |
|---|---|---|
|
Clone | Returns a reference to this instance of String. |
|
Compare | Overloaded. Compares two specified String objects and returns an integer that indicates their relationship to one another in the sort order. |
|
CompareOrdinal | Overloaded. Compares two String objects by evaluating the numeric values of the corresponding Char objects in each string. |
|
CompareTo | Overloaded. Compares this instance with a specified object or String and returns an integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified object or String. |
|
Concat | Overloaded. Concatenates one or more instances of String, or the String representations of the values of one or more instances of Object. |
|
Contains | Returns a value indicating whether the specified String object occurs within this string. |
|
Copy | Creates a new instance of String with the same value as a specified String. |
|
CopyTo | Copies a specified number of characters from a specified position in this instance to a specified position in an array of Unicode characters. |
|
EndsWith | Overloaded. Determines whether the end of an instance of String matches a specified string. |
|
Equals | Overloaded. Determines whether two String objects have the same value. |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
Format | Overloaded. Replaces each format item in a specified string with the text equivalent of a corresponding object's value. |
|
GetEnumerator | Retrieves an object that can iterate through the individual characters in this string. |
|
GetHashCode | Returns the hash code for this string. (Overrides Object.GetHashCode().) |
|
GetType | Gets the type of the current instance. (Inherited from Object.) |
|
GetTypeCode | Returns the TypeCode for class String. |
|
IndexOf | Overloaded. Reports the zero-based index of the first occurrence of a String, or one or more characters, within this string. |
|
IndexOfAny | Overloaded. Reports the index of the first occurrence in this instance of any character in a specified array of Unicode characters. |
|
Insert | Returns a new string in which a specified string is inserted at a specified index position in this instance. |
|
Intern | Retrieves the system's reference to the specified String. |
|
IsInterned | Retrieves a reference to a specified String. |
|
IsNormalized | Overloaded. Indicates whether this string is in a particular Unicode normalization form. |
|
IsNullOrEmpty | Indicates whether the specified string is null or an Empty string. |
|
Join | Overloaded. Concatenates a specified separator String between each element of a specified String array, yielding a single concatenated string. |
|
LastIndexOf | Overloaded. Reports the index position of the last occurrence of a specified Unicode character or String within this instance. |
|
LastIndexOfAny | Overloaded. Reports the index position of the last occurrence in this instance of one or more characters specified in a Unicode array. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Normalize | Overloaded. Returns a new string whose binary representation is in a particular Unicode normalization form. |
|
PadLeft | Overloaded. Returns a new string of a specified length in which the beginning of the string is padded with spaces or a specified Unicode character. |
|
PadRight | Overloaded. Returns a new string of a specified length in which the end of the string is padded with spaces or a specified Unicode character. |
|
Remove | Overloaded. Returns a new string in which a specified number of characters from this instance are deleted. |
|
Replace | Overloaded. Returns a new string in which all occurrences of a specified Unicode character or String in this instance are replaced with another specified Unicode character or String. |
|
Split | Overloaded. Returns a string array that contains the substrings in this instance that are delimited by elements of a specified string or Unicode character array. |
|
StartsWith | Overloaded. Determines whether the beginning of an instance of String matches a specified string. |
|
Substring | Overloaded. Retrieves a substring from this instance. |
|
ToCharArray | Overloaded. Copies the characters in this instance to a Unicode character array. |
|
ToLower | Overloaded. Returns a copy of this String converted to lowercase. |
|
ToLowerInvariant | Returns a copy of this String object converted to lowercase using the casing rules of the invariant culture. |
|
ToString | Overloaded. Converts the value of this instance to a String. |
|
ToUpper | Overloaded. Returns a copy of this String converted to uppercase. |
|
ToUpperInvariant | Returns a copy of this String object converted to uppercase using the casing rules of the invariant culture. |
|
Trim | Overloaded. Returns a new string in which all leading and trailing occurrences of a set of specified characters from the current String object are removed. |
|
TrimEnd | Removes all trailing occurrences of a set of characters specified in an array from the current String object. |
|
TrimStart | Removes all leading occurrences of a set of characters specified in an array from the current String object. |
| Name | Description | |
|---|---|---|
|
Equality | Determines whether two specified String objects have the same value. |
|
Inequality | Determines whether two specified String objects have different values. |
| Name | Description | |
|---|---|---|
|
Aggregate | Applies an accumulator function over a sequence. (Defined by Enumerable.) |
|
All | Determines whether all elements of a sequence satisfy a condition. (Defined by Enumerable.) |
|
Any | Overloaded. Determines whether any element of a sequence exists or satisfies a condition. |
|
AsEnumerable | Returns the input typed as IEnumerable<T>. (Defined by Enumerable.) |
|
AsQueryable | Overloaded. Converts an IEnumerable or generic IEnumerable<T> to an IQueryable or generic IQueryable<T>. |
|
Average | Overloaded. Computes the average of a sequence of numeric values. |
|
Cast | Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
|
Concat | Concatenates two sequences. (Defined by Enumerable.) |
|
Contains | Overloaded. Determines whether a sequence contains a specified element. |
|
Count | Overloaded. Returns the number of elements in a sequence. |
|
DefaultIfEmpty | Overloaded. Returns the elements of an IEnumerable<T>, or a default valued singleton collection if the sequence is empty. |
|
Distinct | Overloaded. Returns distinct elements from a sequence. |
|
ElementAt | Returns the element at a specified index in a sequence. (Defined by Enumerable.) |
|
ElementAtOrDefault | Returns the element at a specified index in a sequence or a default value if the index is out of range. (Defined by Enumerable.) |
|
Except | Overloaded. Produces the set difference of two sequences. |
|
First | Overloaded. Returns the first element of a sequence. |
|
FirstOrDefault | Overloaded. Returns the first element of a sequence, or a default value if no element is found. |
|
Intersect | Overloaded. Produces the set intersection of two sequences. |
|
Last | Overloaded. Returns the last element of a sequence. |
|
LastOrDefault | Overloaded. Returns the last element of a sequence, or a default value if no element is found. |
|
LongCount | Overloaded. Returns an Int64 that represents the number of elements in a sequence. |
|
Max | Overloaded. Returns the maximum value in a sequence of values. |
|
Min | Overloaded. Returns the minimum value in a sequence of values. |
|
OfType | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
|
Reverse | Inverts the order of the elements in a sequence. (Defined by Enumerable.) |
|
SequenceEqual | Overloaded. Determines whether two sequences are equal according to an equality comparer. |
|
Single | Overloaded. Returns a single, specific element of a sequence of values. |
|
SingleOrDefault | Overloaded. Returns a single, specific element of a sequence of values, or a default value if no such element is found. |
|
Skip | Bypasses a specified number of elements in a sequence and then returns the remaining elements. (Defined by Enumerable.) |
|
SkipWhile | Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. |
|
Sum | Overloaded. Computes the sum of a sequence of numeric values. |
|
Take | Returns a specified number of contiguous elements from the start of a sequence. (Defined by Enumerable.) |
|
TakeWhile | Overloaded. Returns elements from a sequence as long as a specified condition is true, and then skips the remaining elements. |
|
ToArray | Creates an array from a IEnumerable<T>. (Defined by Enumerable.) |
|
ToList | Creates a List<T> from an IEnumerable<T>. (Defined by Enumerable.) |
|
Union | Overloaded. Produces the set union of two sequences. |
|
Where | Overloaded. Filters a sequence of values based on a predicate. |
| Name | Description | |
|---|---|---|
|
IEnumerable<Char>.GetEnumerator | Returns an enumerator that iterates through the current String object. |
|
IEnumerable.GetEnumerator | Returns an enumerator that iterates through the current String object. |
|
IConvertible.ToBoolean | Infrastructure. For a description of this member, see ToBoolean. |
|
IConvertible.ToByte | Infrastructure. For a description of this member, see ToByte. |
|
IConvertible.ToChar | Infrastructure. For a description of this member, see ToChar. |
|
IConvertible.ToDateTime | Infrastructure. For a description of this member, see ToDateTime. |
|
IConvertible.ToDecimal | Infrastructure. For a description of this member, see ToDecimal. |
|
IConvertible.ToDouble | Infrastructure. For a description of this member, see ToDouble. |
|
IConvertible.ToInt16 | Infrastructure. For a description of this member, see ToInt16. |
|
IConvertible.ToInt32 | Infrastructure. For a description of this member, see ToInt32. |
|
IConvertible.ToInt64 | Infrastructure. For a description of this member, see ToInt64. |
|
IConvertible.ToSByte | Infrastructure. For a description of this member, see ToSByte. |
|
IConvertible.ToSingle | Infrastructure. For a description of this member, see ToSingle. |
|
IConvertible.ToType | Infrastructure. For a description of this member, see ToType. |
|
IConvertible.ToUInt16 | Infrastructure. For a description of this member, see ToUInt16. |
|
IConvertible.ToUInt32 | Infrastructure. For a description of this member, see ToUInt32. |
|
IConvertible.ToUInt64 | Infrastructure. For a description of this member, see ToUInt64. |