RuntimeReflectionExtensions 类

定义

提供可在运行时检索类型相关信息的方法。

C#
public static class RuntimeReflectionExtensions
继承
RuntimeReflectionExtensions

方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。

GetRuntimeBaseDefinition(MethodInfo)

检索表示在此方法最先声明的直接或间接类上的指定方法的对象。

GetRuntimeEvent(Type, String)

检索一个表示指定事件的对象。

GetRuntimeEvents(Type)

检索表示指定类型定义的所有事件的集合。

GetRuntimeField(Type, String)

检索表示指定字段的对象。

GetRuntimeFields(Type)

检索表示指定类型定义的所有字段的集合。

GetRuntimeInterfaceMap(TypeInfo, Type)

返回指定类型和指定接口的接口映射。

GetRuntimeMethod(Type, String, Type[])

检索表示指定方法的对象。

GetRuntimeMethods(Type)

检索表示指定类型定义的所有方法的集合。

GetRuntimeProperties(Type)

检索表示指定类型定义的所有属性的集合。

GetRuntimeProperty(Type, String)

检索表示指定属性的对象。

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0