通过


SecureString.Length 属性

定义

获取当前安全字符串中的字符数。

public:
 property int Length { int get(); };
public int Length { get; }
member this.Length : int
Public ReadOnly Property Length As Integer

属性值

此安全字符串中的对象数 Char

例外

此安全字符串已释放。

注解

Length 属性返回此实例中的对象数 Char ,而不是 Unicode 字符数。 Unicode 字符可能由多个 Char 对象表示。

实例的最大长度 SecureString 为 65,536 个字符。

适用于