Share via


Chars Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the Char object at a specified position in the current String object.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public ReadOnly Property Chars ( _
    index As Integer _
) As Char
public char this[
    int index
] { get; }
public:
property wchar_t Chars[int index] {
    wchar_t get (int index);
}
member Chars : 
        index:int -> char with get
JScript does not support indexed properties.

Parameters

Property Value

Type: System. . :: . .Char
The object at position index.

Remarks

The index parameter is zero-based.

This property returns the Char object at the position specified by the index parameter. However, a Unicode character might be represented by more than one Char. Use the StringInfo class to work with Unicode characters instead of Char objects.

.NET Framework Security

See Also

Reference

String Class

System Namespace