System Namespace String Class
Returns the character at a specified character position in the given String.
[ VB ]
<Serializable>
Public Default ReadOnly Property Chars ( _
ByVal index As Integer _
) As Char
[ C# ]
[ Serializable ]
public char this [
int index
] { get; }
[ C++ ]
[ Serializable ]
public: __property __wchar_t get_Chars (
int index
);
[ JScript ]
returnValue = StringObject.Chars ( index );
-or-
returnValue = StringObject ( index );
- index
- A character position in the given String.
A Unicode character.
Exception Type |
Condition |
IndexOutOfRangeException |
index is greater than or equal to the length of this object or less than zero. |
index is zero-based.
String Members Char GetEnumerator Int32