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 .NET Micro Framework version 2.0, 2.5

See Also

Reference

String Class
String Members
System Namespace