OffsetToStringData Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the offset, in bytes, to the data in the given string.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

public static int OffsetToStringData { get; }

Property Value

Type: System..::..Int32
The byte offset, from the start of the String object to the first character in the string.

Compilers use this property for unsafe, but efficient, pointer operations on the characters in a managed string. Compilers should pin the string against movement by the garbage collector before use. Note that common language runtime strings are immutable; that is, their contents can be read but not changed.

Show: