Share via


String.Length Property

Gets the number of characters in the current String object.

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

Syntax

public int Length { get; }

Property Value

The number of characters in the current String object.

Remarks

The Length property returns the number of Char objects in the current String object, not the number of Unicode characters. This is because a particular Unicode character might be represented by more than one Char object (standard character).

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

String Class
String Members
System Namespace