RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle) Метод

Определение

Гарантирует, что инициализатор типов (также известный как статический конструктор) для указанного типа запущен.

public:
 static void RunClassConstructor(RuntimeTypeHandle type);
public static void RunClassConstructor(RuntimeTypeHandle type);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Trimmer can't guarantee existence of class constructor")]
public static void RunClassConstructor(RuntimeTypeHandle type);
static member RunClassConstructor : RuntimeTypeHandle -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Trimmer can't guarantee existence of class constructor")>]
static member RunClassConstructor : RuntimeTypeHandle -> unit
Public Shared Sub RunClassConstructor (type As RuntimeTypeHandle)

Параметры

type
RuntimeTypeHandle

Дескриптор типа, указывающий тип, для которого должен выполняться инициализатор типов.

Атрибуты

Исключения

Инициализатор типов создает исключение.

Комментарии

Этот метод используется компиляторами.

Применяется к