You are on page 1of 10

String Members

Represents text as a series of Unicode characters.

The String type exposes the following members.

Constructors
Name Description
String Overloaded. Initializes a new instance of the String class.
Top
Methods
Name Description
Clone Returns a reference to this instance of String.
Overloaded. Compares two specified String objects and returns an integer that
Compare
indicates their relationship to one another in the sort order.
Overloaded. Compares two String objects by evaluating the numeric values of the
CompareOrdinal
corresponding Char objects in each string.
Overloaded. Compares this instance with a specified object or String and returns an
CompareTo integer that indicates whether this instance precedes, follows, or appears in the same
position in the sort order as the specified object or String.
Overloaded. Concatenates one or more instances of String, or the String
Concat
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.
Copies a specified number of characters from a specified position in this instance to a
CopyTo
specified position in an array of Unicode characters.
Overloaded. Determines whether the end of an instance of String matches a specified
EndsWith
string.
Equals Overloaded. Determines whether two String objects have the same value.
Allows an Object to attempt to free resources and perform other cleanup operations
Finalize
before the Object is reclaimed by garbage collection. (Inherited from Object.)
Overloaded. Replaces each format item in a specified string with the text equivalent of
Format
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.
Overloaded. Reports the index of the first occurrence of a String, or one or more
IndexOf
characters, within this string.
Overloaded. Reports the index of the first occurrence in this instance of any character
IndexOfAny
in a specified array of Unicode characters.
Insert Inserts a specified instance of String 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.
Overloaded. Indicates whether this string is in a particular Unicode normalization
IsNormalized
form.
Indicates whether the specified String object is nullNothingnullptra null reference
IsNullOrEmpty
(Nothing in Visual Basic) or an Empty string.
Overloaded. Concatenates a specified separator String between each element of a
Join
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.
Overloaded. Reports the index position of the last occurrence in this instance of one or
LastIndexOfAny
more characters specified in a Unicode array.
MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Overloaded. Returns a new string whose binary representation is in a particular
Normalize
Unicode normalization form.
Overloaded. Returns a new string of a specified length in which the beginning of the
PadLeft
string is padded with spaces or a specified Unicode character.
Overloaded. Returns a new string of a specified length in which the end of the string is
PadRight
padded with spaces or a specified Unicode character.
Overloaded. Returns a new string in which a specified number of characters from this
Remove
instance are deleted.
Overloaded. Returns a new string in which all occurrences of a specified Unicode
Replace character or String in this instance are replaced with another specified Unicode
character or String.
Overloaded. Returns a string array that contains the substrings in this instance that are
Split
delimited by elements of a specified string or Unicode character array.
Overloaded. Determines whether the beginning of an instance of String matches a
StartsWith
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.
Returns a copy of this String object converted to lowercase using the casing rules of
ToLowerInvariant
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.
Returns a copy of this String object converted to uppercase using the casing rules of
ToUpperInvariant
the invariant culture.
Overloaded. Returns a new string in which all leading and trailing occurrences of a set
Trim
of specified characters from the current String object are removed.
Removes all trailing occurrences of a set of characters specified in an array from the
TrimEnd
current String object.
Removes all leading occurrences of a set of characters specified in an array from the
TrimStart
current String object.

Operators
Name Description
Equality Determines whether two specified String objects have the same value.
Inequality Determines whether two specified String objects have different values.

Extension Methods
Name Description
Aggregate Applies an accumulator function over a sequence. (Defined by Enumerable.)
Determines whether all elements of a sequence satisfy a condition. (Defined by
All
Enumerable.)
Overloaded. Determines whether any element of a sequence exists or satisfies a
Any
condition.
AsEnumerable Returns the input typed as IEnumerable<(Of <(T>)>). (Defined by Enumerable.)
Overloaded. Converts an IEnumerable or generic IEnumerable<(Of <(T>)>) to an
AsQueryable
IQueryable or generic IQueryable<(Of <(T>)>).
Average Overloaded. Computes the average of a sequence of numeric values.
Converts the elements of an IEnumerable to the specified type. (Defined by
Cast
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.
Overloaded. Returns the elements of an IEnumerable<(Of <(T>)>), or a default
DefaultIfEmpty
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.)
Returns the element at a specified index in a sequence or a default value if the index
ElementAtOrDefault
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.
Overloaded. Returns the first element of a sequence, or a default value if no element
FirstOrDefault
is found.
Intersect Overloaded. Produces the set intersection of two sequences.
Last Overloaded. Returns the last element of a sequence.
Overloaded. Returns the last element of a sequence, or a default value if no element
LastOrDefault
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.
Filters the elements of an IEnumerable based on a specified type. (Defined by
OfType
Enumerable.)
Reverse Inverts the order of the elements in a sequence. (Defined by Enumerable.)
Overloaded. Determines whether two sequences are equal according to an equality
SequenceEqual
comparer.
Single Overloaded. Returns a single, specific element of a sequence of values.
Overloaded. Returns a single, specific element of a sequence of values, or a default
SingleOrDefault
value if no such element is found.
Bypasses a specified number of elements in a sequence and then returns the
Skip
remaining elements. (Defined by Enumerable.)
Overloaded. Bypasses elements in a sequence as long as a specified condition is true
SkipWhile
and then returns the remaining elements.
Sum Overloaded. Computes the sum of a sequence of numeric values.
Returns a specified number of contiguous elements from the start of a sequence.
Take
(Defined by Enumerable.)
Overloaded. Returns elements from a sequence as long as a specified condition is
TakeWhile
true, and then skips the remaining elements.
ToArray Creates an array from a IEnumerable<(Of <(T>)>). (Defined by Enumerable.)
Creates a List<(Of <(T>)>) from an IEnumerable<(Of <(T>)>). (Defined by
ToList
Enumerable.)
Union Overloaded. Produces the set union of two sequences.
Where Overloaded. Filters a sequence of values based on a predicate.
Fields
Name Description
Empty Represents the empty string. This field is read-only.
Properties
Name Description
Chars Gets the character at a specified character position in the current String object.
Length Gets the number of characters in the current String object.
Explicit Interface Implementations
Name Description
Returns an enumerator that iterates through the current
IEnumerable<(Of <(Char>)>)..::.GetEnumerator
String object.
Returns an enumerator that iterates through the current
IEnumerable..::.GetEnumerator
String object.
Infrastructure. For a description of this member, see
IConvertible..::.ToBoolean
ToBoolean.
Infrastructure. For a description of this member, see
IConvertible..::.ToByte
ToByte.
Infrastructure. For a description of this member, see
IConvertible..::.ToChar
ToChar.
Infrastructure. For a description of this member, see
IConvertible..::.ToDateTime
ToDateTime.
Infrastructure. For a description of this member, see
IConvertible..::.ToDecimal
ToDecimal.
Infrastructure. For a description of this member, see
IConvertible..::.ToDouble
ToDouble.
Infrastructure. For a description of this member, see
IConvertible..::.ToInt16
ToInt16.
Infrastructure. For a description of this member, see
IConvertible..::.ToInt32
ToInt32.
Infrastructure. For a description of this member, see
IConvertible..::.ToInt64
ToInt64.
Infrastructure. For a description of this member, see
IConvertible..::.ToSByte
ToSByte.
Infrastructure. For a description of this member, see
IConvertible..::.ToSingle
ToSingle.
Infrastructure. For a description of this member, see
IConvertible..::.ToType
ToType.
Infrastructure. For a description of this member, see
IConvertible..::.ToUInt16
ToUInt16.
Infrastructure. For a description of this member, see
IConvertible..::.ToUInt32
ToUInt32.
Infrastructure. For a description of this member, see
IConvertible..::.ToUInt64
ToUInt64.

Float Members

The Float class wraps the primitive type float. It contains several methods for conversion between String
and Float and processing Float objects.

The following tables list the members exposed by the Float type.

Public Constructors

Name Description
Float Overloaded.

Public Fields

Name Description
MAX_VALUE A constant field that stores the maximum finite value of the float type.
MIN_VALUE A constant field that stores the minimum positive value of the float type.
NaN A constant that stores the Not-a-Nmber value of the float type.
NEGATIVE_INFINITY A constant that stores the negative infinity value for the float type.
POSITIVE_INFINITY A constant that stores the positive infinity value for the float type.
TYPE The constant that stores the Class instance of the primitive type float.

Public Methods

Name Description
byteValue Overridden. Returns the value of the current Float object converted to a byte.
compareTo Overloaded.
doubleValue Overridden. Returns the double value of the current Float object.
equals Overridden. Checks if the current Float object is equal to another specified object.
floatToIntBits Returns the int representation of the floating-point parameter.
floatValue Overridden. Returns the float value of the current Float object.
hashCode Overridden. Returns the hash code of the current Float object.
getClass (inherited from Object)
intBitsToFloat Returns the floating-point value that corresponds to a specific bit pattern.
intValue Overridden. Returns the value of the current Float object converted to int.
isInfinite Overloaded.
isNaN Overloaded.
longValue Overridden. Returns the value of the current Float object converted to long.
clone (inherited from Number)
parseFloat Returns a float value specified by the string parameter.
shortValue Overridden. Returns the value of the current Float object converted to short.
ToBoolean
ToByte
ToChar
ToDateTime
ToDecimal
ToDouble
ToInt16
ToInt32
ToInt64
ToSByte
ToSingle
toString Returns a string that represents the float parameter.
toString Overloaded. Overridden.
ToType
ToUInt16
ToUInt32
ToUInt64
valueOf Returns the Float object whose float value is represented by a specified string parameter.

Double Members

Double overview
Public Fields
Epsilon Represents the smallest positive Double greater than
zero. This field is constant.
Supported by the .NET Compact Framework.
MaxValue Represents the largest possible value of a Double.
This field is constant.
Supported by the .NET Compact Framework.
MinValue Represents the smallest possible value of a Double.
This field is constant.
Supported by the .NET Compact Framework.
NaN Represents a value that is not a number (NaN). This
field is constant.
Supported by the .NET Compact Framework.
NegativeInfinity Represents negative infinity. This field is constant.

Supported by the .NET Compact Framework.
PositiveInfinity Represents positive infinity. This field is constant.

Supported by the .NET Compact Framework.

Public Methods
CompareTo Compares this instance to a specified object and
returns an indication of their relative values.
Supported by the .NET Compact Framework.
Equals Overridden. Returns a value indicating whether this
instance is equal to a specified object.
Supported by the .NET Compact Framework.
GetHashCode Overridden. Returns the hash code for this instance.

Supported by the .NET Compact Framework.
GetType (inherited from Object) Gets the Type of the current instance.

Supported by the .NET Compact Framework.
GetTypeCode Returns the TypeCode for value type Double.

Supported by the .NET Compact Framework.
IsInfinity Returns a value indicating whether the specified
number evaluates to negative or positive infinity
Supported by the .NET Compact Framework.
IsNaN Returns a value indicating whether the specified
number evaluates to a value that is not a number
Supported by the .NET Compact Framework. (NaN).
IsNegativeInfinity Returns a value indicating whether the specified
number evaluates to negative infinity.
Supported by the .NET Compact Framework.
IsPositiveInfinity Returns a value indicating whether the specified
number evaluates to positive infinity.
Supported by the .NET Compact Framework.
Parse Overloaded. Converts the string representation of a
number to its double-precision floating point number
equivalent.
Supported by the .NET Compact Framework.
ToString Overloaded. Overridden. Converts the numeric value
of this instance to its equivalent string representation.
Supported by the .NET Compact Framework.
TryParse Converts the string representation of a number in a
specified style and culture-specific format to its
double-precision floating point number equivalent.

Protected Methods
Finalize (inherited from Object) Overridden. Allows an Object to attempt to free
resources and perform other cleanup operations
Supported by the .NET Compact Framework. before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using
destructor syntax.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

Supported by the .NET Compact Framework.

Char Members

Represents a Unicode character.

The Char type exposes the following members.

Methods
Name Description
Overloaded. Compares this instance to a specified object or value type, and indicates
CompareTo whether this instance precedes, follows, or appears in the same position in the sort
order as the specified object or value type.
ConvertFromUtf32 Converts the specified Unicode code point into a UTF-16 encoded string.
Overloaded. Converts the value of a UTF-16 encoded surrogate pair into a Unicode
ConvertToUtf32
code point.
Overloaded. Returns a value that indicates whether this instance is equal to a
Equals
specified object or Char value.
Allows an Object to attempt to free resources and perform other cleanup operations
Finalize
before the Object is reclaimed by garbage collection. (Inherited from Object.)
Returns the hash code for this instance. (Overrides ValueType..::.GetHashCode()()
GetHashCode
().)
Overloaded. Converts a specified numeric Unicode character to a double-precision
GetNumericValue
floating-point number.
GetType Gets the Type of the current instance. (Inherited from Object.)
GetTypeCode Returns the TypeCode for value type Char.
Overloaded. Categorizes a Unicode character into a group identified by one of the
GetUnicodeCategory
UnicodeCategory values.
Overloaded. Indicates whether a specified Unicode character is categorized as a
IsControl
control character.
IsDigit Overloaded. Indicates whether a Unicode character is categorized as a decimal digit.
IsHighSurrogate Overloaded. Indicates whether the specified Char object is a high surrogate.
IsLetter Overloaded. Indicates whether a Unicode character is categorized as an alphabetic
letter.
Overloaded. Indicates whether a Unicode character is categorized as a letter or a
IsLetterOrDigit
decimal digit.
Overloaded. Indicates whether a Unicode character is categorized as a lowercase
IsLower
letter.
IsLowSurrogate Overloaded. Indicates whether the specified Char object is a low surrogate.
IsNumber Overloaded. Indicates whether a Unicode character is categorized as a number.
Overloaded. Indicates whether a Unicode character is categorized as a punctuation
IsPunctuation
mark.
Overloaded. Indicates whether a Unicode character is categorized as a separator
IsSeparator
character.
IsSurrogate Overloaded. Indicates whether a character has a surrogate code point.
IsSurrogatePair Overloaded. Indicates whether two specified Char objects form a surrogate pair.
Overloaded. Indicates whether a Unicode character is categorized as a symbol
IsSymbol
character.
Overloaded. Indicates whether a Unicode character is categorized as an uppercase
IsUpper
letter.
IsWhiteSpace Overloaded. Indicates whether a Unicode character is categorized as white space.
MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Parse Converts the value of the specified string to its equivalent Unicode character.
ToLower Overloaded. Converts the value of a Unicode character to its lowercase equivalent.
Converts the value of a Unicode character to its lowercase equivalent using the
ToLowerInvariant
casing rules of the invariant culture.
Overloaded. Converts the value of this instance to its equivalent string
ToString
representation.
ToUpper Overloaded. Converts the value of a Unicode character to its uppercase equivalent.
Converts the value of a Unicode character to its uppercase equivalent using the
ToUpperInvariant
casing rules of the invariant culture.
Converts the value of the specified string to its equivalent Unicode character. A
TryParse
return code indicates whether the conversion succeeded or failed.
Fields
Name Description
MaxValue Represents the largest possible value of a Char. This field is constant.
MinValue Represents the smallest possible value of a Char. This field is constant.
Explicit Interface Implementations
Name Description
Infrastructure. Note This conversion is not supported. Attempting to do so
IConvertible..::.ToBoolean
throws an InvalidCastException.
IConvertible..::.ToByte Infrastructure. For a description of this member, see IConvertible..::.ToByte.
IConvertible..::.ToChar Infrastructure. For a description of this member, see IConvertible..::.ToChar.
Infrastructure. Note This conversion is not supported. Attempting to do so
IConvertible..::.ToDateTime
throws an InvalidCastException.
Infrastructure. Note This conversion is not supported. Attempting to do so
IConvertible..::.ToDecimal
throws an InvalidCastException.
Infrastructure. Note This conversion is not supported. Attempting to do so
IConvertible..::.ToDouble
throws an InvalidCastException.
IConvertible..::.ToInt16 Infrastructure. For a description of this member, see IConvertible..::.ToInt16.
IConvertible..::.ToInt32 Infrastructure. For a description of this member, see IConvertible..::.ToInt32.
IConvertible..::.ToInt64 Infrastructure. For a description of this member, see IConvertible..::.ToInt64.
Infrastructure. For a description of this member, see
IConvertible..::.ToSByte
IConvertible..::.ToSByte.
Infrastructure. Note This conversion is not supported. Attempting to do so
IConvertible..::.ToSingle
throws an InvalidCastException.
IConvertible..::.ToType Infrastructure. For a description of this member, see IConvertible..::.ToType.
Infrastructure. For a description of this member, see
IConvertible..::.ToUInt16
IConvertible..::.ToUInt16.
Infrastructure. For a description of this member, see
IConvertible..::.ToUInt32
IConvertible..::.ToUInt32.
Infrastructure. For a description of this member, see
IConvertible..::.ToUInt64
IConvertible..::.ToUInt64.

Integer Members

Declares an Integer class type that wraps the primitive type int into an object. The class contains method
members to perform tests and to convert from int to other types and vice versa.

The following tables list the members exposed by the Integer type.

Public Constructors

Name Description
Integer Overloaded. Constructs a new Integer object.

Public Fields

Name Description
MAX_VALUE The maximum value an Integer object can store.
MIN_VALUE The minimum value an Integer object can store.
TYPE The instance of the Class type that represents the primitive type of the Integer object.

Public Methods

Name Description
byteValue Overridden. Returns the byte value of an Integer object.
compareTo Overloaded. Compares two Integer objects.
decode Decodes a string and returns the corresponding integer.
doubleValue Overridden. Returns the double value of an Integer object.
equals Overridden. Compares the current object to another object and returns a Boolean value.
floatValue Overridden. Returns the float value of an Integer object.
hashCode Overridden. Retrieves the hash code of an Integer object.
getInteger Overloaded. Returns the integer value of a property.
getClass (inherited from Object)
intValue Overridden. Returns the int value of the current Integer object.
longValue Overridden. Returns the long value of the current Integer object.
clone (inherited from Number)
parseInt Overloaded. Parses the string parameter and converts it to an integer value.
shortValue Overridden. Returns the short value of an Integer object.
toBinaryString Converts the value of an integer to a binary string.
ToBoolean Converts the value of an integer to Boolean using a specific format.
ToByte Converts an Integer value to a byte using a specific format.
ToChar Converts an Integer value to a char using a specific format.
ToDateTime Converts an Integer object value to a date-time value using a specific format.
ToDecimal Converts an Integer object value to a decimal value using a specific format.
ToDouble Converts an Integer object value to a double value using a specific format.
toHexString Returns the hexadecimal string representation of an int.
ToInt16 Converts an Integer object value to a 2-byte integer using a specific format.
ToInt32 Converts an Integer object value to a 4-byte integer using a specific format.
ToInt64 Converts an Integer object value to an 8-byte integer using a specific format.
toOctalString Returns the octal number string representation of an int.
ToSByte Converts an Integer object value to an sbyte value using a specific format.
ToSingle Converts an Integer object value to a float value using a specific format.
toString Overloaded.
toString Overloaded. Overridden. Returns the string representation of the value of an Integer object.
ToType Converts an Integer object to a specific type using a specified format.
ToUInt16 Converts an Integer object to an unsigned short integer using a specified format.
ToUInt32 Converts an Integer object to an unsigned integer using a specified format.
ToUInt64 Converts an Integer object to an unsigned long integer using a specified format.
valueOf Overloaded.