String.GetPinnableReference 方法

定義

傳回位於索引零的字串元素參考。

這個方法的目的是要支援 .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 fixed 語句內使用。

適用於