MethodBuilder.IsSecuritySafeCritical 属性

定义

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

public:
 virtual property bool IsSecuritySafeCritical { bool get(); };
public override bool IsSecuritySafeCritical { get; }
member this.IsSecuritySafeCritical : bool
Public Overrides ReadOnly Property IsSecuritySafeCritical As Boolean

属性值

Boolean

在所有情况下均引发 NotSupportedExceptionThrows a NotSupportedException in all cases.

例外

在所有情况下。In all cases. 动态程序集中不支持此属性。This property is not supported in dynamic assemblies.

注解

若要确定动态程序集中的方法是否是安全可靠关键的,请通过调用来完成该类型, TypeBuilder.CreateType GetMethod 在已完成的类型上调用方法,并获取 IsSecuritySafeCritical 所生成的的属性 MethodInfoTo determine whether a method in a dynamic assembly is security-safe-critical, complete the type by calling TypeBuilder.CreateType, call the GetMethod method on the completed type, and get the IsSecuritySafeCritical property on the resulting MethodInfo.

适用于