System
Namespaces
Classes
-
Represents text as a sequence of characters.
-
Represents a 32-bit signed integer.
-
Represents an instance of time.
-
Represents errors that occur during application execution.
-
Provides standard input, output, and error streams.
Interfaces
-
Defines a method to release unmanaged resources.
-
Exposes an enumerator, which supports a simple iteration over a non-generic collection.
Structs
-
Base class for all value types.
-
Represents a Boolean value (true or false).
Enums
-
Specifies the day of the week.
-
Specifies the scope of an environment variable.
String
Represents text as a sequence of characters.
Inheritance: Object
→ String
Constructors
-
String(char[] value)Initializes a new instance of the String class to the value indicated by a specified array of Unicode characters.
-
String(char[] value, int startIndex, int length)Initializes a new instance of the String class to the value indicated by a specified subarray of Unicode characters, a starting position and a length.
Properties
-
Chars[int index]Gets the Char object at the specified position in the current String object.
-
LengthGets the number of characters in the current String object.
Methods
-
CompareTo(string strB)Compares the current string instance to another string instance.
-
Contains(string value)Determines whether the specified string occurs within this string.
-
EndsWith(string value)Determines whether the specified string ends with the characters of this string.
-
Equals(string value)Determines whether the specified string is equal to the current string.
-
IndexOf(string value)Returns the zero-based index of the first occurrence of the specified string within this string.
-
Insert(int startIndex, string value)Inserts a string into this instance at the specified zero-based index.
-
PadLeft(int totalWidth, char paddingChar)Pads the current string with as many specified characters as needed to reach a specified total length, and aligns the text to the center of the padded space.
-
Remove(int startIndex)Removes all characters from this string starting at a specified position and continuing through the last position.
-
Replace(char oldChar, char newChar)Replaces all occurrences of a specified Unicode character in this instance with another specified Unicode character.
-
Split(char[] separator)Splits this string into a sequence of substrings based on the specified separators.
-
StartsWith(string value)Determines whether the current string begins with the specified string.
-
Substring(int startIndex)Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.
-
ToLower()Converts this string to lowercase.
-
ToUpper()Converts this string to uppercase.
-
Trim()Removes all leading and trailing white space characters from the current String object.
-
TrimEnd(char[] trimChars)Removes all trailing occurrences of a set of characters specified by trimChars from the current String object.
-
TrimStart(char[] trimChars)Removes all leading occurrences of a set of characters specified by trimChars from the current String object.
-
Format(string format, object arg0)Formats a string by using the specified format string and arguments.
Fields
-
EmptyRepresents an empty string.