String.GetPinnableReference 方法

定义

返回对索引为零的字符串元素的引用。

此方法旨在支持.NET编译器,不应由用户代码调用。

public:
 char ^ GetPinnableReference();
public ref readonly char GetPinnableReference();
member this.GetPinnableReference : unit -> char
Public Function GetPinnableReference () As Char

返回

对字符串中第一个字符的引用;如果字符串为空,则为对字符串的 null 终止符的引用。

例外

字符串为 null。

注解

该方法 GetPinnableReference 返回可用于固定 String 内存中的字符。 必须支持 String 在固定语句中使用。

适用于