String.GetPinnableReference 方法

定义

返回对索引 0 处字符串的元素的引用。

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

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

返回

Char

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

例外

字符串为 NULL。

注解

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

适用于