public sealed class RuntimeHelpers
Object
RuntimeHelpers
mscorlib
RuntimeInfrastructure
Implements static methods and properties that provide special support for compilers.
[Note: The types inSystem.Runtime.CompilerServices
are intended primarily for use by compilers, not application programmers. They allow compilers to easily implement certain language features that are not directly visible to programmers.]
System.Runtime.CompilerServices Namespace
RuntimeHelpers Methods
RuntimeHelpers.InitializeArray Method
RuntimeHelpers.RunClassConstructor Method
RuntimeHelpers Properties
public static void InitializeArray(Array array, RuntimeFieldHandle fldHandle);
Provides a fast way to initialize a Array from data stored in a module.
- array
- The Array to be initialized.
- fldHandle
- A RuntimeFieldHandle specifying the location of the data used to initialize array .
This method is for compiler use only.
System.Runtime.CompilerServices.RuntimeHelpers Class, System.Runtime.CompilerServices Namespace
public static void RunClassConstructor(RuntimeTypeHandle type);
Runs a specified class constructor method.
- type
- A RuntimeTypeHandle specifying the class constructor method to run.
System.Runtime.CompilerServices.RuntimeHelpers Class, System.Runtime.CompilerServices Namespace
public static int OffsetToStringData { get; }
Gets the number of bytes between the start of a String and the first Char in the string.
A Int32 containing the number of bytes between the start of a String and the first Char in the string.
This property is read-only.[Note: This property is deprecated; its design is considered unnecessarily inflexible. It is expected that an improved design can be incorporated into the next revision of this Standard.
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 prior to use. Note that strings are immutable: their contents can be read but not changed.
The contents of these offset bytes are implementation-defined.
]
System.Runtime.CompilerServices.RuntimeHelpers Class, System.Runtime.CompilerServices Namespace