RuntimeHelpers Class
Collapse the table of content
Expand the table of content

RuntimeHelpers Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides a set of static methods and properties that provide support for compilers. This class cannot be inherited.


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

public static class RuntimeHelpers

The RuntimeHelpers type exposes the following members.

Public propertyStatic memberOffsetToStringDataGets the offset in bytes to the data in the given string.

Public methodStatic memberGetHashCodeServes as a hash function for a particular type, suitable for use in hashing algorithms and data structures such as a hash table.
Public methodStatic memberGetObjectValueBoxes a value type.
Public methodStatic memberInitializeArrayProvides a fast way to initialize an array from data stored in a module.
Public methodStatic memberRunClassConstructorRuns a specified class constructor method.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

© 2018 Microsoft