String.GetPinnableReference 方法

定義

回傳指向字串中索引為零的元素的參考。

此方法旨在支援 .NET 編譯器,並非使用者程式碼所呼叫。

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

傳回

參考字串中的第一個字元,或在字串為空時參考字串的空終止符。

例外狀況

字串為空。

備註

此方法回 GetPinnableReference 傳一個字元,可用於在記憶體中釘釘 a String 。 它必須支持在固定語句中使用 a String

適用於