BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 This type is safe for multithreaded operations. System.Object System.Collections.Generic.IEnumerable<System.Char> System.ICloneable System.IComparable System.IComparable<System.String> System.IConvertible System.IEquatable<System.String> System.Runtime.InteropServices.ComVisible(true)

Represents an immutable series of characters.

An is the position of a character within a string. The first character in the string is at index 0. The length of a string is the number of characters it is made up of. The last accessible of a string instance is - 1.

Strings are immutable; once created, the contents of a do not change. Combining operations, such as , cannot alter existing strings. Instead, such operations return a new string that contains the results of the operation, an unchanged string, or the null value. To perform modifications to a use the .

Implementations of are required to contain a variable-length character buffer positioned a fixed number of bytes after the beginning of the String object. The method returns the number of bytes between the start of the String object and the character buffer. This information is intended primarily for use by compilers, not application programmers. For additional information, see .

Comparisons and searches are case-sensitive by default, and unless otherwise specified, use the culture defined (if any) for the current thread to determine the order of the alphabet used by the strings. This information is then used to compare the two strings on a character-by-character basis. Upper case letters evaluate greater than their lowercase equivalents.

The following characters are considered white space when present in a instance: 0x9, 0xA, 0xB, 0xC, 0xD, 0x20, 0xA0, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x200B, 0x3000, and 0xFEFF. The null character is defined as hexadecimal 0x00.

The () constructor is omitted for performance reasons. If you need a copy of a , consider using or the class.

To insert a formatted string representation of an object into a string, use the methods. These methods take one or more arguments to be formatted, and a format string. The format string contains literals and zero or more format specifications of the form { [, ][: ]}, where:

is a zero-based integer indicating the argument to be formatted. If the actual argument is a null reference, then an empty string is used in its place.
is an optional integer indicating the minimum width of the region to contain the formatted value of argument . If the length of the string representation of the value is less than , then the region is padded with spaces. If is negative, the formatted value is left justified in the region; if is positive, then the value is right justified. If is not specified, it is assumed to be zero indicating that neither padding nor alignment is customized. Note that if the length of the formatted value is greater than , then is ignored.
is an optional string that determines the representation used for arguments. For example, an integer can be represented in hexadecimal or decimal format, or as a monetary value. If is omitted and an argument implements the interface, then a null reference is used as the format specifier. Therefore, all implementations of are required to allow a null reference as a format specifier, and return a string containing the default representation of the object as determined by the object type. For additional information on format specifiers, see .

If an object referenced in the format string implements , then the method of the object provides the formatting. If the argument does not implement , then the method of the object provides default formatting, and , if present, is ignored. For an example that demonstrates this, see Example 2.

To include a curly bracket in a formatted string, specify the bracket twice; for example, specify "{{" to include "{" in the formatted string. See Example 1.

The class exposes the same functionality as the methods via and . The primary difference is that the methods return the formatted string, while the System.Console methods write the formatted string to a stream.

When a non-empty string is searched for the first or last occurrence of an empty string, the empty string is found at the search start position.

Example 1

The following example demonstrates formatting numeric data types and inserting literal curly brackets into strings.

`using System; class StringFormatTest { public static void Main() { decimal dec = 1.99999m; double doub = 1.0000000001; string somenums = String.Format("Some formatted numbers: dec={0,15:E} doub={1,20}", dec, doub); Console.WriteLine(somenums); string curlies = "Literal curly brackets: {{ and }} and {{0}}"; Console.WriteLine(curlies); object nullObject = null; string embeddedNull = String.Format("A null argument looks like: {0}", nullObject); Console.WriteLine(embeddedNull); } }`

The output is

`Some formatted numbers: dec= 1.999990E+000 doub= 1.0000000001 Literal curly brackets: {{ and }} and {{0}} A null argument looks like:`

Example 2

The following example demonstrates how formatting works if is or is not implemented by an argument to the method. Note that the format specifier is ignored if the argument does not implement .

`using System; class StringFormatTest { public class DefaultFormatEleven { public override string ToString() { return "11 string"; } } public class FormattableEleven:IFormattable { // The IFormattable ToString implementation. public string ToString(string format, IFormatProvider formatProvider) { Console.Write("[IFormattable called] "); return 11.ToString(format, formatProvider); } // Override Object.ToString to show that it is not called. public override string ToString() { return "Formatted 11 string"; } } public static void Main() { DefaultFormatEleven def11 = new DefaultFormatEleven (); FormattableEleven for11 = new FormattableEleven(); string def11string = String.Format("{0}",def11); Console.WriteLine(def11string); // The format specifier x is ignored. def11string = String.Format("{0,15:x}", def11); Console.WriteLine(def11string); string form11string = String.Format("{0}",for11); Console.WriteLine(form11string ); form11string = String.Format("{0,15:x}",for11); Console.WriteLine(form11string); } }`

The output is

`11 string 11 string [IFormattable called] 11 [IFormattable called] b`

Example 3

The following example demonstrates searching for an empty string in a non-empty string.

`using System; class EmptyStringSearch { public static void Main() { Console.WriteLine("ABCDEF".IndexOf("")); Console.WriteLine("ABCDEF".IndexOf("", 2)); Console.WriteLine("ABCDEF".IndexOf("", 3, 2)); Console.WriteLine("ABCDEF".LastIndexOf("")); Console.WriteLine("ABCDEF".LastIndexOf("", 1)); Console.WriteLine("ABCDEF".LastIndexOf("", 4, 2)); } }`

The output is

`0 2 3 5 1 4`
- Constructor
  System.CLSCompliant(false)
  A pointer to a null-terminated array of Unicode characters. If is a null pointer, is created.

  Constructs and initializes a new instance of using a specified pointer to a sequence of Unicode characters.

  This member is not CLS-compliant. For a CLS-compliant alternative, use the ([] ) constructor.

  This constructor copies the sequence of Unicode characters at the specified pointer until a null character (hexadecimal 0x00) is reached.

  If the specified array is not null-terminated, the behavior of this constructor is system dependent. For example, such a situation might cause an access violation.

  In C# this constructor is defined only in the context of unmanaged code.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  An array of Unicode characters.

  Constructs and initializes a new instance of by copying the specified array of Unicode characters.

  If the specified array is a null reference or contains no elements, is created.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  System.CLSCompliant(false)
  To be added.
  To be added.
  To be added.
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  A .
  A containing the number of occurrences of .
  To be added.

  Constructs and initializes a new instance of .

  If the specified number is 0, is created.

  is less than zero.

  The following example demonstrates using this constructor.

  using System;

  public class StringExample { public static void Main() {

  string s = new String('a', 10);

  Console.WriteLine(s); } }

  The output is

  aaaaaaaaaa

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  System.CLSCompliant(false)
  A pointer to an array of Unicode characters.
  A containing the index within the array referenced by from which to start copying.
  A containing the number of characters to copy from to the new . If is zero, is created.

  Constructs and initializes a new instance of using a specified pointer to a sequence of Unicode characters, the index within that sequence at which to start copying characters, and the number of characters to be copied to construct the .

  This member is not CLS-compliant. For a CLS-compliant alternative, use the (, , ) constructor.

  This constructor copies Unicode characters from , starting at and ending at ( + - 1).

  If the specified range is outside of the memory allocated for the sequence of characters, the behavior of this constructor is system dependent. For example, such a situation might cause an access violation.

  In C# this constructor is defined only in the context of unmanaged code.

  or is less than zero.

  -or-

  is a null pointer and is not zero.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  An array of Unicode characters.
  A containing the index within the array referenced by from which to start copying.
  A containing the number of characters to copy from the array. If is zero, is created.

  Constructs and initializes a new instance of using an array of Unicode characters, the index within array at which to start copying characters, and the number of characters to be copied.

  This constructor copies the sequence Unicode characters found at between indexes and + - 1.

  is a null reference.

  or is less than zero.

  -or-

  The sum of and is greater than the number of elements in .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  System.CLSCompliant(false)
  To be added.
  To be added.
  To be added.
  To be added.
  To be added.
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Constructor
  System.CLSCompliant(false)
  A pointer to a array.
  A containing the starting position within .
  A containing the number of characters within to use. If is zero, is created.
  A object that specifies how the array referenced by is encoded.
  To be added.

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

  If is a pointer, a instance is constructed.

  or is less than zero.

  -or-

  is a null pointer and is not zero.

  1
  RuntimeInfrastructure
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Char `` To be added.

  Gets the character at a specified position in the current instance.

  A Unicode character at the location index in the current instance.

  This property is read-only.

  is the position of a character within a string. The first character in the string is at index 0. The length of a string is the number of characters it is made up of. The last accessible of a string instance is its length - 1.

  is greater than or equal to the length of the current instance or less than zero. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Object

  Returns a reference to the current instance of .

  A reference to the current instance of .

  does not generate a new instance. Use the or method to create a separate object with the same value as the current instance.

  This method is implemented to support the interface.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` The first to compare. Can be a null reference. The second to compare. Can be a null reference.

  Compares two objects in a case-sensitive manner.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the specified strings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Meaning
  A negative number
  is lexicographically < .
  Zero
  is lexicographically == .
  A positive number
  is lexicographically > .

  This method performs a case-sensitive operation.

  The result of comparing any (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Uppercase letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` The first to compare. Can be a null reference. The second to compare. Can be a null reference. A indicating whether the comparison is case-insensitive. If is , the comparison is case-insensitive. If is , the comparison is case-sensitive, and uppercase letters evaluate greater than their lowercase equivalents.

  Returns sort order of two objects, ignoring or honoring their case.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the specified substrings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Meaning
  A negative number
  is < .
  Zero
  == .
  A positive number
  is > .

  The result of comparing any (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Uppercase letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  (, , ) is equivalent to (, ).

  The following example demonstrates comparing strings with and without case sensitivity.

  `using System; public class StringCompareExample { public static void Main() { string strA = "A STRING"; string strB = "a string"; int first = String.Compare( strA, strB, true ); int second = String.Compare( strA, strB, false ); Console.WriteLine( "When 'A STRING' is compared to 'a string' in a case-insensitive manner, the return value is {0}.", first ); Console.WriteLine( "When 'A STRING' is compared to 'a string' in a case-sensitive manner, the return value is {0}.", second ); } }`

  The output is

  When 'A STRING' is compared to 'a string' in a case-insensitive manner, the return value is 0.

  When 'A STRING' is compared to 'a string' in a case-sensitive manner, the return value is 1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  System.Int32 `` `` `` `` `` The first to compare. Can be a null reference. A containing the starting index of the substring within . The second to compare. Can be a null reference. A containing the starting index of the substring within . A containing the maximum number of characters in the substrings to compare. If is zero, then zero is returned.

  Compares substrings of two strings.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the specified substrings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Meaning
  A negative number
  The substring in is < the substring in .
  Zero
  The substring in == the substring in , or is zero.
  A positive number
  The substring in is > the substring in .

  The result of comparing any (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Uppercase letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  The sum of and is greater than .Length .

  -or-

  The sum of and is greater than .Length .

  -or-

  , , or is negative.

  The following example demonstrates comparing substrings.

  `using System; public class StringCompareExample { public static void Main() { string strA = "A string"; string strB = "B ring"; int first = String.Compare( strA, 4, strB, 2, 3 ); int second = String.Compare( strA, 3, strB, 3, 3 ); Console.WriteLine( "When the substring 'rin' of 'A string' is compared to the substring 'rin' of 'B ring', the return value is {0}.", first ); Console.WriteLine( "When the substring 'tri' of 'A string' is compared to the substring 'ing' of 'B ring', the return value is {0}.", second ); } }`

  The output is

  When the substring 'rin' of 'A string' is compared to the substring 'rin' of 'B ring', the return value is 0.

  When the substring 'tri' of 'A string' is compared to the substring 'ing' of 'B ring', the return value is 1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` `` `` `` The first containing a substring to compare. Can be a null reference. A containing the starting index of the substring within . The second containing a substring to compare. Can be a null reference. A containing the starting index of the substring within . A containing the maximum number of characters in the substrings to compare. If is zero, then zero is returned. A indicating if the comparison is case-insensitive. If is , the comparison is case-insensitive. If is , the comparison is case-sensitive, and upper case letters evaluate greater than their lower case equivalents. To be added.

  Compares substrings of two strings, ignoring or honoring their case.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the specified substrings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value Type
  Condition
  A negative number
  The substring in is < the substring in .
  Zero
  The substring in == the substring in , or is zero.
  A positive number
  The substring in is > the substring in .

  The result of comparing any (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Uppercase letters evaluate greater than their lower case equivalents.

  The maximum number of characters compared is the lesser of the length of less , the length of less , and .

  When a culture is available, the method uses the culture of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  is greater than .Length

  -or-

  is greater than .Length

  -or-

  , , or is negative.

  The following example demonstrates comparing substrings with and without case sensitivity.

  `using System; public class StringCompareExample { public static void Main() { string strA = "STRING A"; string strB = "string b"; int first = String.Compare( strA, strB, true ); int second = String.Compare( strA, 0, strB, 0, 4, true ); int third = String.Compare( strA, 0, strB, 0, 4, false ); Console.WriteLine( "When the string 'STRING A' is compared to the string 'string b' in a case-insensitive manner, the return value is {0}.", first ); Console.WriteLine( "When the substring 'STRI' of 'STRING A' is compared to the substring 'stri' of 'string b' in a case-insensitive manner, the return value is {0}.", second ); Console.WriteLine( "When the substring 'STRI' of 'STRING A' is compared to the substring 'stri' of 'string b' in a case-sensitive manner, the return value is {0}.", third ); } }`

  The output is

  When the string 'STRING A' is compared to the string 'string b' in a case-insensitive manner, the return value is -1.

  When the substring 'STRI' of 'STRING A' is compared to the substring 'stri' of 'string b' in a case-insensitive manner, the return value is 0.

  When the substring 'STRI' of 'STRING A' is compared to the substring 'stri' of 'string b' in a case-sensitive manner, the return value is 1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  System.Int32 `` `` The first to compare. The second to compare.

  Compares two specified objects based on the code points of the contained Unicode characters.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the specified strings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Description
  A negative number
  is < , or is a null reference.
  Zero
  == , or both and are null references.
  A positive number
  is > , or is a null reference.

  The result of comparing any (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Uppercase letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` `` `` The first to compare. A containing the starting index of the substring in . The second to compare. A containing the starting index of the substring in . A containing the number of characters in the substrings to compare.

  Compares substrings of two specified objects based on the code points of the contained Unicode characters.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the specified strings. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value Type
  Condition
  A negative number
  The substring in is < the substring in , or is a null reference.
  Zero
  The substring in == the substring in , or both and are null references.
  A positive number
  The substring in is > the substring in , or is a null reference.

  When either of the String arguments is the null reference an shall be thrown if the corresponding index is non-zero.

  The maximum number of characters compared is the lesser of the length of less , the length of less , and .

  The result of comparing any (including the empty string) to a null reference is greater than zero. The result of comparing two null references is zero. Upper case letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  is greater than .Length

  -or-

  is greater than .Length

  -or-

  , , or is negative.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` The to compare to the current instance.

  Returns the sort order of the current instance compared to the specified object.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to . For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Condition
  A negative number
  The current instance is lexicographically < .
  Zero
  The current instance is lexicographically == .

  A positive number

  The current instance is lexicographically > , or is a null reference.

  is required to be a object.

  The result of comparing any (including the empty string) to a null reference is greater than zero. Uppercase letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  This method is implemented to support the interface.

  is not a . 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` The to compare to the current instance.

  Returns the sort order of the current instance compared to the specified string.

  The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to . For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Condition
  A negative number
  The current instance is lexicographically < .
  Zero
  The current instance is lexicographically == .

  A positive number

  The current instance is lexicographically > , or is a null reference.

  Uppercase letters evaluate greater than their lowercase equivalents.

  The method uses the culture (if any) of the current thread to determine the ordering of individual characters. The two strings are compared on a character-by-character basis.

  This method is implemented to support the interface.

  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String `` To be added. To be added. To be added. To be added.
- Method
  System.String `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `System.ParamArray` An array of instances to concatenate.

  Concatenates the representations of the elements in an array of instances.

  The concatenated representations of the values of the elements in .

  This method concatenates the values returned by the methods on every object in the array. is used in place of any null reference in the array.

  is a null reference.

  The following example demonstrates concatenating an array of objects.

  `using System; public class StringConcatExample { public static void Main() { string str = String.Concat( 'c', 32, "String" ); Console.WriteLine( "The concatenated Object array is: {0}", str ); } }`

  The output is

  The concatenated Object array is: c32String

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `System.ParamArray` An array of instances to concatenate.

  Concatenates the elements of a specified array.

  A containing the concatenated elements of .

  is used in place of any null reference in the array.

  is a null reference.

  The following example demonstrates concatenating an array of strings.

  `using System; public class StringConcatExample { public static void Main() { string str = String.Concat( "one", "two", "three", "four", "five" ); Console.WriteLine( "The concatenated String array is: {0}", str ); } }`

  The output is

  The concatenated String array is: onetwothreefourfive

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` To be added. To be added.

  Concatenates the representations of two specified objects.

  The concatenated representation of the values of and .

  is used in place of any null argument.

  This version of is equivalent to ( .ToString(), .ToString () ).

  If either of the arguments is an array reference, the method concatenates a string representing that array, instead of its members (for example, )[].

  The following example demonstrates concatenating two objects.

  `using System; public class StringConcatExample { public static void Main() { string str = String.Concat( 'c', 32 ); Console.WriteLine( "The concatenated Objects are: {0}", str ); } }`

  The output is

  The concatenated Objects are: c32

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` To be added. To be added.

  Concatenates two specified instances of .

  A containing the concatenation of and .

  is used in place of any null argument.

  The following example demonstrates concatenating two strings.

  `using System; public class StringConcatExample { public static void Main() { string str = String.Concat( "one", "two" ); Console.WriteLine( "The concatenated strings are: {0}", str ); } }`

  The output is

  The concatenated strings are: onetwo

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` `` To be added. To be added. To be added.

  Concatenates the representations of three specified objects, in order provided.

  The concatenated representations of the values of , , and .

  This method concatenates the values returned by the methods on every argument. is used in place of any null argument.

  This version of is equivalent to ( .(), .(), . () ).

  The following example demonstrates concatenating three objects.

  `using System; public class StringConcatExample { public static void Main() { string str = String.Concat( 'c', 32, "String" ); Console.WriteLine( "The concatenated Objects are: {0}", str ); } }`

  The output is

  The concatenated Objects are: c32String

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` `` To be added. To be added. To be added.

  Concatenates three specified instances of .

  A containing the concatenation of , , and .

  is used in place of any null argument.

  The following example demonstrates concatenating three strings.

  `using System; public class StringConcatExample { public static void Main() { string str = String.Concat( "one", "two", "three" ); Console.WriteLine( "The concatenated strings are: {0}", str ); } }`

  The output is

  The concatenated strings are: onetwothree

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0 System.CLSCompliant(false)
- Method
  System.String `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String `` To be added. To be added. To be added. To be added. To be added.
- Method
  System.Boolean `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String `` The to be copied.

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

  A new with the same value as .

  To be added. is a null reference.

  The following example demonstrates copying strings.

  `using System; public class StringCopyExample { public static void Main() { string strA = "string"; Console.WriteLine( "The initial string, strA, is '{0}'.", strA ); string strB = String.Copy( strA ); strA = strA.ToUpper(); Console.WriteLine( "The copied string, strB, before strA.ToUpper, is '{0}'.", strB ); Console.WriteLine( "The initial string after StringCopy and ToUpper, is '{0}'.", strA ); Console.WriteLine( "The copied string, strB, after strA.ToUpper, is '{0}'.", strB ); } }`

  The output is

  The initial string, strA, is 'string'.

  The copied string, strB, before strA.ToUpper, is 'string'.

  The initial string after StringCopy and ToUpper, is 'STRING'.

  The copied string, strB, after strA.ToUpper, is 'string'.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Void `` `` `` `` A containing the index of the current instance from which to copy. An array of Unicode characters. A containing the index of an array element in to copy. A containing the number of characters in the current instance to copy to .

  Copies a specified number of characters from a specified position in the current instance to a specified position in a specified array of Unicode characters.

  To be added. is a null reference.

  , , or is negative

  -or-

  is greater than the length of the substring from to the end of the current instance

  -or-

  is greater than the length of the subarray from to the end of

  The following example demonstrates copying characters from a string to a Unicode character array.

  `using System; public class StringCopyToExample { public static void Main() { string str = "this is the new string"; Char[] cAry = {'t','h','e',' ','o','l','d'}; Console.WriteLine( "The initial string is '{0}'", str ); Console.Write( "The initial character array is: '" ); foreach( Char c in cAry) Console.Write( c ); Console.WriteLine( "'" ); str.CopyTo( 12, cAry, 4, 3 ); Console.Write( "The character array after CopyTo is: '" ); foreach( Char c in cAry) Console.Write( c ); Console.WriteLine("'"); } }`

  The output is

  The initial string is 'this is the new string'

  The initial character array is: 'the old'

  The character array after CopyTo is: 'the new'

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Field
  System.String

  A constant string representing the empty string.

  This field is read-only.

  This field is a string of length zero, "".

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Boolean `` A to match.

  Returns a value that indicates whether the ending characters of the current instance match the specified .

  if the end of the current instance is equal to ; if is not equal to the end of the current instance or is longer than the current instance.

  This method compares with the substring at the end of the current instance that has a same length as

  The comparison is case-sensitive.

  is a null reference.

  The following example demonstrates determining whether the current instance ends with a specified string.

  `using System; public class StringEndsWithExample { public static void Main() { string str = "One string to compare"; Console.WriteLine( "The given string is '{0}'", str ); Console.Write( "The given string ends with 'compare'? " ); Console.WriteLine( str.EndsWith( "compare" ) ); Console.Write( "The given string ends with 'Compare'? " ); Console.WriteLine( str.EndsWith( "Compare" ) ); } }`

  The output is

  The given string is 'One string to compare'

  The given string ends with 'compare'? True

  The given string ends with 'Compare'? False

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` A .

  Determines whether the current instance and the specified object have the same value.

  if is a and its value is the same as the value of the current instance; otherwise, .

  This method checks for value equality. This comparison is case-sensitive.

  This method overrides .

  The current instance is a null reference.

  The following example demonstrates checking to see if an object is equal to the current instance.

  `using System; public class StringEqualsExample { public static void Main() { string str = "A string"; Console.WriteLine( "The given string is '{0}'", str ); Console.Write( "The given string is equal to 'A string'? " ); Console.WriteLine( str.Equals( "A string" ) ); Console.Write( "The given string is equal to 'A String'? " ); Console.WriteLine( str.Equals( "A String" ) ); } }`

  The output is

  The given string is 'A string'

  The given string is equal to 'A string'? True

  The given string is equal to 'A String'? False

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
- Method
  System.Boolean `` A .

  Determines whether the current instance and the specified string have the same value.

  if the value of is the same as the value of the current instance; otherwise, .

  This method checks for value equality. This comparison is case-sensitive.

  This method is implemented to support the interface.

  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
- Method
  System.Boolean `` `` A or a null reference. A or a null reference.

  Determines whether two specified objects have the same value.

  if the value of is the same as the value of ; otherwise, .

  The comparison is case-sensitive.

  The following example demonstrates checking to see if two strings are equal.

  `using System; public class StringEqualsExample { public static void Main() { string strA = "A string"; string strB = "a string"; string strC = "a string"; Console.Write( "The string '{0}' is equal to the string '{1}'? ", strA, strB ); Console.WriteLine( String.Equals( strA, strB ) ); Console.Write( "The string '{0}' is equal to the string '{1}'? ", strC, strB ); Console.WriteLine( String.Equals( strC, strB ) ); } }`

  The output is

  The string 'A string' is equal to the string 'a string'? False

  The string 'a string' is equal to the string 'a string'? True

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String `` `` A containing zero or more format specifications. A to be formatted. Can be a null reference.

  Replaces the format specification in a provided with a specified textual equivalent of the value of a specified instance.

  A copy of in which the first format specification has been replaced by the formatted equivalent of the .

  If an object referenced in the format string is a null reference, an empty string is used in its place.

  This version of is equivalent to ( , , [] {} ). For more information on the format specification see the class overview.

  is a null reference.

  The format specification in is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (1).

  The following example demonstrates the method.

  `using System; public class StringFormat { public static void Main() { Console.WriteLine(String.Format("The high temperature today was {0:###} degrees.", 88)); Console.WriteLine("The museum had {0,-6} visitors today.", 88); } }`

  The output is

  `The high temperature today was 88 degrees. The museum had 88 visitors today.` 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `System.ParamArray` A containing zero or more format specifications. A array containing the objects to be formatted.

  Replaces the format specification in a specified with the textual equivalent of the value of a corresponding instance in a specified array.

  A containing a copy of in which the format specifications have been replaced by the equivalent of the corresponding instances of in .

  If an object referenced in the format string is a null reference, an empty string is used in its place.

  This version of is equivalent to ( null, , ). For more information on the format specification see the class overview.

  or is a null reference.

  is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the length of the array.

  The following example demonstrates the method.

  `using System; public class StringFormat { public static void Main() { Console.WriteLine( String.Format("The winning numbers were {0:000} {1:000} {2:000} {3:000} {4:000} today.", 5, 10, 11, 37, 42) ); Console.WriteLine( "The winning numbers were {0, -6}{1, -6}{2, -6}{3, -6}{4, -6} today.", 5, 10, 11, 37, 42 ); } }`

  The output is

  `The winning numbers were 005 010 011 037 042 today. The winning numbers were 5 10 11 37 42 today.` 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` `System.ParamArray` A interface that supplies an object that provides culture-specific formatting information. Can be a null reference. A containing zero or more format specifications. A array to be formatted.

  Replaces the format specification in a specified with the culture-specific textual equivalent of the value of a corresponding instance in a specified array.

  A containing a copy of in which the format specifications have been replaced by the equivalent of the corresponding instances of in .

  If an object referenced in the format string is a null reference, an empty string is used in its place.

  The parameter string is embedded with zero or more format specifications of the form, { [, ][: ]}, where is a zero-based integer indicating the argument to be formatted, is an optional integer indicating the width of the region to contain the formatted value, and is an optional string of formatting codes. For more information on the format specification see the class overview.

  or is a null reference.

  is invalid.

  -or-

  The number indicating an argument to be formatted () is less than zero, or greater than or equal to the length of the array.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` `` A containing zero or more format specifications. A to be formatted. Can be a null reference. A to be formatted. Can be a null reference.

  Replaces the format specification in a specified with the textual equivalent of the value of two specified instances.

  A containing a copy of in which the format specifications have been replaced by the equivalent of and .

  If an object referenced in the format string is a null reference, an empty string is used in its place.

  This version of is equivalent to ( , , {, } ). For more information on the format specification see the class overview.

  is a null reference.

  is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (2).

  The following example demonstrates the method.

  `using System; public class StringFormat { public static void Main() { Console.WriteLine( String.Format("The temperature today oscillated between {0:####} and {1:####} degrees.", 78, 100) ); Console.WriteLine( String.Format("The temperature today oscillated between {0:0000} and {1:0000} degrees.", 78, 100) ); Console.WriteLine( "The temperature today oscillated between {0, -4} and {1, -4} degrees.", 78, 100 ); } }`

  The output is

  `The temperature today oscillated between 78 and 100 degrees. The temperature today oscillated between 0078 and 0100 degrees. The temperature today oscillated between 78 and 100 degrees.` 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` `` `` A containing zero or more format specifications. The first to be formatted. Can be a null reference. The second to be formatted. Can be a null reference. The third to be formatted. Can be a null reference.

  Replaces the format specification in a specified with the textual equivalent of the value of three specified instances.

  A containing a copy of in which the first, second, and third format specifications have been replaced by the equivalent of , , and .

  If an object referenced in the format string is a null reference, an empty string is used in its place.

  This version of is equivalent to ( , , {, , } ). For more information on the format specification see the class overview.

  is a null reference.

  is invalid.

  -or-

  The number indicating an argument to be formatted is less than zero, or greater than or equal to the number of provided objects to be formatted (3).

  The following example demonstrates the method.

  `using System; public class StringFormat { public static void Main() { Console.WriteLine(String.Format("The temperature today oscillated between {0:###} and {1:###} degrees. The average temperature was {2:000} degrees.", 78, 100, 91)); Console.WriteLine("The temperature today oscillated between {0, 4} and {1, 4} degrees. The average temperature was {2, 4} degrees.", 78, 100, 91); } }`

  The output is

  `The temperature today oscillated between 78 and 100 degrees. The average temperature was 091 degrees. The temperature today oscillated between 78 and 100 degrees. The average temperature was 91 degrees.` 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.CharEnumerator

  Retrieves an object that can iterate through the individual characters in the current instance.

  A object.

  This method is required by programming languages that support the interface to iterate through members of a collection.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32

  Generates a hash code for the current instance.

  A containing the hash code for this instance.

  The algorithm used to generate the hash code is unspecified.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)
- Method
  System.TypeCode To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` A Unicode character.

  Returns the index of the first occurrence of a specified Unicode character in the current instance.

  A containing the zero-based index of the first occurrence of character in the current instance; otherwise, -1 if was not found.

  This method is case-sensitive.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` The for which to search.

  Returns the index of the first occurrence of a specified in the current instance.

  A that indicates the result of the search for in the current instance as follows:

  Return Value
  Description
  A zero-based number equal to the index of the start of the first substring in the current instance that is equal to

  .
  was found starting at the index returned.
  -1
  was not found.

  The search begins at the first character of the current instance. The search is case-sensitive, culture-sensitive, and the culture (if any) of the current thread is used.

  is a null reference.

  The following example demonstrates the method.

  `using System; public class StringIndexOf { public static void Main() { String str = "This is the string"; Console.WriteLine( "Searching for the index of \"is\" yields {0,2}.", str.IndexOf( "is" ) ); Console.WriteLine( "Searching for the index of \"Is\" yields {0,2}.", str.IndexOf( "Is" ) ); Console.WriteLine( "Searching for the index of \"\" yields {0,2}.", str.IndexOf( "" ) ); } }`

  The output is

  Searching for the index of "is" yields 2.

  Searching for the index of "Is" yields -1.

  Searching for the index of "" yields 0.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` A Unicode character. A containing the index of the current instance from which to start searching.

  Returns the index of the first occurrence of a specified Unicode character in the current instance, with the search starting from a specified index.

  A containing the zero-based index of the first occurrence of in the current instance starting from the specified index; otherwise, -1 if was not found.

  This method is case-sensitive.

  is less than zero or greater than the length of the current instance.

  The following example demonstrates the method.

  `using System; public class StringIndexOf { public static void Main() { String str = "This is the string"; Console.WriteLine( "Searching for the index of 'h' starting from index 0 yields {0}.", str.IndexOf( 'h', 0 ) ); Console.WriteLine( "Searching for the index of 'h' starting from index 10 yields {0}.", str.IndexOf( 'h', 10 ) ); } }`

  The output is

  Searching for the index of 'h' starting from index 0 yields 1.

  Searching for the index of 'h' starting from index 10 yields -1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` The for which to search. A containing the index of the current instance from which to start searching.

  Returns the index of the first occurrence of a specified in the current instance, with the search starting from a specified index.

  A that indicates the result of the search for in the current instance as follows:

  Return Value
  Description
  A zero-based number equal to the index of the start of the first substring in the current instance that is equal to .
  was found starting at the index returned.
  -1
  was not found.

  This method is case-sensitive.

  is a null reference.

  is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` A Unicode character. A containing the index of the current instance from which to start searching. A containing the number of consecutive elements of the current instance to be searched starting at .

  Returns the index of the first occurrence of a specified Unicode character in the current instance, with the search over the specified range starting at the provided index.

  A containing the zero-based index of the first occurrence of in the current instance in the specified range of indexes; otherwise, -1 if was not found.

  The search begins at and continues until + - 1 is reached. The character at + is not included in the search.

  This method is case-sensitive.

  or is negative

  -or-

  + is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` The for which to search A containing the index of the current instance from which to start searching. A containing the number of consecutive elements of the current instance to be searched starting at .

  Returns the index of the first occurrence of a specified in the current instance, with the search over the specified range starting at the provided index.

  A that indicates the result of the search for in the current instance as follows:

  Return Value
  Description
  A zero-based number equal to the index of the start of the first substring in the current instance that is equal to .
  was found starting at the index returned.
  -1
  was not found.

  The search begins at and continues until + - 1 is reached. The character at + is not included in the search.

  This method is case-sensitive.

  is a null reference.

  or is negative

  -or-

  + is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` An array of Unicode characters.

  Reports the index of the first occurrence in the current instance of any character in a specified array of Unicode characters.

  The index of the first occurrence of an element of in the current instance; otherwise, -1 if no element of was found.

  This method is case-sensitive.

  is a null reference. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` An array of Unicode characters. A containing the index of the current instance from which to start searching.

  Returns the index of the first occurrence of any element in a specified array of Unicode characters in the current instance, with the search starting from a specified index.

  A containing a positive value equal to the index of the first occurrence of an element of in the current instance; otherwise, -1 if no element of was found.

  This method is case-sensitive.

  is a null reference. is greater than the length of the current instance 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` An array containing the Unicode characters to seek. A containing the index of the current instance from which to start searching. A containing the range of the current instance at which to end searching.

  Returns the index of the first occurrence of any element in a specified Array of Unicode characters in the current instance, with the search over the specified range starting from the provided index.

  A containing a positive value equal to the index of the first occurrence of an element of in the current instance; otherwise, -1 if no element of was found.

  The search begins at and continues until + - . The character at + is not included in the search.

  This method is case-sensitive.

  is a null reference.

  or is negative.

  -or-

  + is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` A containing the index of the insertion. The to insert.

  Returns a equivalent to the current instance with a specified inserted at the specified position.

  A new that is equivalent to the current string with inserted at index

  In the new string returned by this method, the first character of is at and all characters in the current string from to the end are inserted in the new string after the last character of .

  is a null reference.

  is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` A .

  Retrieves the system's reference to a specified .

  The reference to .

  Instances of each unique literal string constant declared in a program, as well as any unique instance of you add programmatically are kept in a table, called

  the "intern pool".

  The intern pool conserves string storage. If a literal string constant is assigned to several variables, each variable is set to reference the same constant in the intern pool instead of referencing several different instances of that

  have identical values.

  This method looks up a specified string in the intern pool. If the string exists, a reference to it is returned. If it does not exist, an instance equal to the specified string is added to the intern pool and a reference that

  instance is returned.

  is a null reference.

  The following example demonstrates the method.

  `using System; using System.Text; public class StringExample { public static void Main() { String s1 = "MyTest"; String s2 = new StringBuilder().Append("My").Append("Test").ToString(); String s3 = String.Intern(s2); Console.WriteLine(Object.ReferenceEquals(s1, s2)); //different Console.WriteLine(Object.ReferenceEquals(s1, s3)); //the same } }`

  The output is

  False

  True

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` A .

  Retrieves a reference to a specified .

  A reference to if it is in the system's intern pool; otherwise, a null reference.

  Instances of each unique literal string constant declared in a program, as well as any unique instance of you add programmatically are kept in a table, called the "intern pool".

  The intern pool conserves string storage. If a literal string constant is assigned to several variables, each variable is set to reference the same constant in the intern pool instead of referencing several different instances of that have identical values.

  This method does not return a value, but can still be used where a is needed.

  is a null reference.

  The following example demonstrates the method.

  `using System; using System.Text; public class StringExample { public static void Main() { String s1 = new StringBuilder().Append("My").Append("Test").ToString(); Console.WriteLine(String.IsInterned(s1) != null); } }`

  The output is

  True

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Boolean To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  4.0.0.0
  System.Boolean `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String `` `System.ParamArray` To be added. To be added. To be added. To be added. To be added.
- Method
  System.String `` `` A . A array.

  Concatenates the elements of a specified array, inserting a separator string between each element pair and yielding a single concatenated string.

  A consisting of the elements of separated by instances of the string.

  To be added. is a null reference.

  The following example demonstrates the method.

  `using System; public class StringJoin { public static void Main() { String[] strAry = { "Red" , "Green" , "Blue" }; Console.WriteLine( String.Join( " :: ", strAry ) ); } }`

  The output is

  Red :: Green :: Blue

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` `` `` A . A array. A containing the first array element in to join. A containing the number of elements in to join.

  Concatenates a specified separator between the elements of a specified array, yielding a single concatenated string.

  A consisting of the specified strings in joined by . Returns if is zero, has no elements, or and all the elements of are .

  To be added. plus is greater than the number of elements in .

  The following example demonstrates the method.

  `using System; public class StringJoin { public static void Main() { String[] strAry = { "Red" , "Green" , "Blue" }; Console.WriteLine( String.Join( " :: ", strAry, 1, 2 ) ); } }`

  The output is

  Green :: Blue

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  4.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.String `` `` To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  System.Int32 `` The Unicode character to locate.

  Returns the index of the last occurrence of a specified character within the current instance.

  A containing the index of the last occurrence of in the current instance, if found; otherwise, -1.

  This method is case-sensitive.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` A .

  Returns the index of the last occurrence of a specified within the current instance.

  A that indicates the result of the search for in the current instance as follows:
  Return Value
  Description
  A zero-based number equal to the index of the start of the last substring in the current instance that is equal to .
  was found.
  -1
  was not found.

  The search is case-sensitive.

  is a null reference. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` A Unicode character to locate. A containing the index in the current instance from which to begin searching.

  Returns the index of the last occurrence of a specified character within the current instance.

  A containing the index of the last occurrence of in the current instance, if found; otherwise, -1.

  This method searches for the last occurrence of the specified character between the start of the string and the indicated index.

  This method is case-sensitive.

  is a null reference. is less than zero or greater than the length of the current instance.

  The following example demonstrates the method.

  `using System; public class StringLastIndexOfTest { public static void Main() { String str = "aa bb cc dd"; Console.WriteLine( str.LastIndexOf('d', 8) ); Console.WriteLine( str.LastIndexOf('b', 8) ); } }`

  The output is

  -1

  4

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` A . A containing the index of the current instance from which to start searching.

  Returns the index of the last occurrence of a specified within the current instance, starting at a given position.

  A that indicates the result of the search for in the current instance as follows:

  Return Value
  Description
  A zero-based number equal to the index of the start of the last substring in the current instance that is equal to .
  was found.
  -1
  was not found.

  This method searches for the last occurrence of the specified between the start of the string and the indicated index.

  This method is case-sensitive.

  is a null reference. is less than zero or greater than or equal to the length of the current instance. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` A Unicode character to locate. A containing the index of the current instance from which to start searching. A containing the range of the current instance at which to end searching.

  Returns the index of the last occurrence of a specified character in the provided range of the current instance.

  A containing the index of the last occurrence of in the current instance if found between and ( - + 1); otherwise, -1.

  This method is case-sensitive.

  is a null reference.

  or is less than zero.

  -or-

  - is less than -1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` The substring to search for. A containing the index of the current instance from which to start searching. A containing the range of the current instance at which to end searching.

  Returns the index of the last occurrence of a specified in the provided range of the current instance.

  A that indicates the result of the search for in the current instance as follows:
  Return Value
  Description
  A zero-based number equal to the index of the start of the last substring in the current instance that is equal to .
  was found.
  -1
  was not found.

  The search begins at and continues until - + 1.

  This method is case-sensitive.

  is a null reference.

  or is less than zero.

  -or-

  - is smaller than -1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` An array of Unicode characters.

  Returns the index of the last occurrence of any element of a specified array of characters in the current instance.

  A containing the index of the last occurrence of any element of in the current instance, if found; otherwise, -1.

  This method is case-sensitive.

  is a null reference. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` `` An array of Unicode characters. A containing the index of the current instance from which to start searching.

  Returns the index of the last occurrence of any element of a specified array of characters in the current instance.

  A containing the index of the last occurrence of any element of in the current instance, if found; otherwise, -1.

  This method searches for the last occurrence of the specified characters between the start of the string and the indicated index.

  This method is case-sensitive.

  is a null reference.

  is less than zero or greater than or equal to the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Int32 `` `` `` An array of Unicode characters. A containing the index of the current instance from which to start searching. A containing the range of the current instance at which to end searching.

  Returns the index of the last occurrence of any of specified characters in the provided range of the current instance.

  A containing the index of the last occurrence of any element of if found between and ( - + 1); otherwise, -1.

  The search begins at and continues until - + 1. The character at - is not included in the search.

  This method is case-sensitive.

  is a null reference.

  or is less than zero.

  -or-

  - is smaller than -1.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Property
  System.Int32

  Gets the number of characters in the current instance.

  A containing the number of characters in the current instance.

  This property is read-only.

  The following example demonstrates the property.

  `using System; public class StringLengthExample { public static void Main() { string str = "STRING"; Console.WriteLine( "The length of string {0} is {1}", str, str.Length ); } }`

  The output is

  The length of string STRING is 6

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` `` The first to compare. The second to compare.

  Returns a value indicating whether the two specified string values are equal to each other.

  if and represent the same string value; otherwise, .

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` `` The first to compare. The second to compare.

  Returns a value indicating whether the two string values are not equal to each other.

  if and do not represent the same string value; otherwise, .

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` A containing the number of characters in the resulting string.

  Right-aligns the characters in the current instance, padding with spaces on the left, for a specified total length.

  A new that is equivalent to the current instance right-aligned and padded on the left with as many spaces as needed to create a length of . If is less than the length of the current instance, returns a new that is identical to the current instance.

  A space in Unicode format is defined as the hexadecimal value 0x20.

  is less than zero. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` A containing the number of characters in the resulting string. A that specifies the padding character to use.

  Right-aligns the characters in the current instance, padding on the left with a specified Unicode character, for a specified total length.

  A new that is equivalent to the current instance right-aligned and padded on the left with as many characters as needed to create a length of . If is less than the length of the current instance, returns a new that is identical to the current instance.

  To be added. is less than zero. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` A containing the number of characters in the resulting string.

  Left-aligns the characters in the current instance, padding with spaces on the right, for a specified total number of characters.

  A new that is equivalent to this instance left aligned and padded on the right with as many spaces as needed to create a length of . If is less than the length of the current instance, returns a new that is identical to the current instance.

  To be added. is less than zero. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` A containing the number of characters in the resulting string. A that specifies the padding character to use.

  Left-aligns the characters in the current instance, padding on the right with a specified Unicode character, for a specified total number of characters.

  A new that is equivalent to the current instance left aligned and padded on the right with as many characters as needed to create a length of . If is less than the length of the current instance, returns a new that is identical to the current instance.

  To be added. is less than zero. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String `` `` A containing the index of the current instance from which to start deleting characters. A containing the number of characters to delete.

  Deletes a specified number of characters from the current instance beginning at a specified index.

  A new that is equivalent to the current instance without the specified range characters.

  To be added.

  or is less than zero.

  -or-

  plus is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` `` The Unicode character to be replaced. The Unicode character to replace all occurrences of .

  Replaces all instances of a specified Unicode character with another specified Unicode character.

  A equivalent to the current instance with all occurrences of replaced with .

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` A containing the string value to be replaced. A containing the string value to replace all occurrences of . Can be a null reference.

  Replaces all instances of a specified substring within the current instance with another specified string.

  A equivalent to the current instance with all occurrences of replaced with . If the replacement value is a null reference, the specified substring is removed.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String[] `System.ParamArray` A array of delimiters. Can be a null reference.

  Returns substrings of the current instance that are delimited by the specified characters.

  A array containing the results of the split operation as follows:

  Return Value
  Description
  A single-element array containing the current instance.
  None of the elements of are contained in the current instance.
  A multi-element array, each element of which is a substring of the current instance that was delimited by one or more characters in
  At least one element of is contained in the current instance.
  A multi-element array, each element of which is a substring of the current instance that was delimited by white space characters.
  The current instance contains white space characters and is a null reference or an empty array.

  is returned for any substring where two delimiters are adjacent or a delimiter is found at the beginning or end of the current instance.

  Delimiter characters are not included in the substrings.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String[] `` `` An array of Unicode characters that delimit the substrings in the current instance, an empty array containing no delimiters, or a null reference. A containing the maximum number of array elements to return.

  Returns substrings of the current instance that are delimited by the specified characters.

  A array containing the results of the split operation as follows:

  Return Value
  Description
  A single-element array containing the current instance.
  None of the elements of are contained in the current instance.
  A multi-element array, each element of which is a substring of the current instance that was delimited by one or more characters in
  At least one element of is contained in the current instance.
  A multi-element array, each element of which is a substring of the current instance that was delimited by white space characters.
  The current instance contains white space characters and is a null reference or an empty array.

  is returned for any substring where two delimiters are adjacent or a delimiter is found at the beginning or end of the current instance.

  Delimiter characters are not included in the substrings.

  If there are more substrings in the current instance than the maximum specified number, the first -1 elements of the array contain the first - 1 substrings. The remaining characters in the current instance are returned in the last element of the array.

  is negative. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String[] `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.String[] `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.String[] `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.String[] `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Boolean `` A .

  Returns a value that indicates whether the start of the current instance matches the specified .

  if the start of the current instance is equal to ; if is not equal to the start of the current instance or is longer than the current instance.

  This method compares with the substring at the start of the current instance that has a length of .Length. If .Length is greater than the length of the current instance or the relevant substring of the current instance is not equal to , this method returns ; otherwise, this method returns .

  The comparison is case-sensitive.

  is a null reference. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0 System.Runtime.InteropServices.ComVisible(false)
- Method
  System.Boolean `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String `` A containing the index of the start of the substring in the current instance.

  Retrieves a substring from the current instance, starting from a specified index.

  A equivalent to the substring that begins at of the current instance. Returns if is equal to the length of the current instance.

  To be added. is less than zero or greater than the length of the current instance. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` `` A containing the index of the start of the substring in the current instance. A containing the number of characters in the substring.

  Retrieves a substring from the current instance, starting from a specified index, continuing for a specified length.

  A containing the substring of the current instance with the specified length that begins at the specified position. Returns if is equal to the length of the current instance and length is zero.

  To be added.

  is greater than the length of the current instance.

  -or-

  or is less than zero.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.Collections.Generic.IEnumerator<System.Char>

  This method is implemented to support the interface.

  To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.Collections.IEnumerator Implemented to support the interface. [Note: For more information, see .] To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Boolean `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Byte `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Char `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.DateTime `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Decimal `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Double `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int16 `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int32 `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Int64 `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.SByte `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Single `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Object `` `` To be added. To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.UInt16 `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.UInt32 `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.UInt64 `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Char[]

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

  A array whose elements are the individual characters of the current instance. If the current instance is an empty string, the array returned by this method is empty and has a zero length.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.Char[] `` `` A containing the index of the start of a substring in the current instance. A containing the length of the substring in the current instance.

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

  A array whose elements are the number of characters in the current instance, starting from the index in the current instance. If the specified length is zero, the entire string is copied starting from the beginning of the current instance, and ignoring the value of . If the current instance is an empty string, the returned array is empty and has a zero length.

  To be added.

  or is less than zero.

  -or-

  plus is greater than the length of the current instance.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String

  Returns a copy of this in lowercase.

  A in lowercase..

  This method takes into account the culture (if any) of the current thread.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String

  Returns a representation of the value of the current instance.

  The current .

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String `` (Reserved) A interface implementation which supplies culture-specific formatting information.

  Returns this instance of ; no actual conversion is performed.

  This .

  is reserved, and does not currently participate in this operation.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
- Method
  System.String

  Returns a copy of the current instance with all elements converted to uppercase, using default properties.

  A new in uppercase.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `` To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String To be added. To be added. To be added. 2.0.0.0 4.0.0.0
- Method
  System.String

  Removes all occurrences of white space characters from the beginning and end of the current instance.

  A new equivalent to the current instance after white space characters are removed from its beginning and end.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `System.ParamArray` An array of Unicode characters. Can be a null reference.

  Removes all occurrences of a set of characters provided in a character from the beginning and end of the current instance.

  A new equivalent to the current instance with the characters in removed from its beginning and end. If is a null reference, all of the white space characters are removed from the beginning and end of the current instance.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `System.ParamArray` An array of Unicode characters. Can be a null reference.

  Removes all occurrences of a set of characters specified in a Unicode character from the end of the current instance.

  A new equivalent to the current instance with characters in removed from its end. If is a null reference, white space characters are removed.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
- Method
  System.String `System.ParamArray` An array of Unicode characters or a null reference.

  Removes all occurrences of a set of characters specified in a Unicode character array from the beginning of the current instance.

  A new equivalent to the current instance with the characters in removed from its beginning. If is a null reference, white space characters are removed.

  To be added. 0 1.0.5000.0 2.0.0.0 4.0.0.0
0