System.String.Chars Property
Gets the character at a specified position in the current instance.

Syntax

This is the default property for this class.

public char this [int index] { get; }

Parameters

index
Documentation for this section has not yet been entered.

Value

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

Exceptions

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

Remarks

This property is read-only.

index 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 index of a string instance is its length - 1.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0