RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle) 方法

定义

确保已运行指定类型的类型初始值设定项(也称为静态构造函数)。

public:
 static void RunClassConstructor(RuntimeTypeHandle type);
public static void RunClassConstructor (RuntimeTypeHandle type);
static member RunClassConstructor : RuntimeTypeHandle -> unit
Public Shared Sub RunClassConstructor (type As RuntimeTypeHandle)

参数

type
RuntimeTypeHandle

类型句柄,用于指定应为其运行类型初始值设定项的类型。

例外

类型初始值设定项引发异常。

注解

此方法由编译器使用。

适用于