共用方式為


RuntimeHelpers.OffsetToStringData 屬性

定義

警告

OffsetToStringData is obsolete. Use string.GetPinnableReference() instead.

警告

OffsetToStringData has been deprecated. Use string.GetPinnableReference() instead.

取得指定字串中資料的位移 (以位元組為單位)。

public:
 static property int OffsetToStringData { int get(); };
public static int OffsetToStringData { get; }
[System.Obsolete("OffsetToStringData is obsolete. Use string.GetPinnableReference() instead.")]
public static int OffsetToStringData { get; }
[System.Obsolete("OffsetToStringData has been deprecated. Use string.GetPinnableReference() instead.")]
public static int OffsetToStringData { get; }
static member OffsetToStringData : int
[<System.Obsolete("OffsetToStringData is obsolete. Use string.GetPinnableReference() instead.")>]
static member OffsetToStringData : int
[<System.Obsolete("OffsetToStringData has been deprecated. Use string.GetPinnableReference() instead.")>]
static member OffsetToStringData : int
Public Shared ReadOnly Property OffsetToStringData As Integer

屬性值

String 物件開始到字串中之第一個字元的位元組位移。

屬性

備註

編譯程式會針對 Managed 字串中字元的不安全但有效率且有效率的指標作業使用這個屬性。 編譯程式應該先釘選字串,以防止垃圾收集行程移動,再使用。 請注意,Common Language Runtime 字串是不可變的;也就是說,可以讀取其內容,但無法變更。

適用於