MethodBase 成员

提供有关方法和构造函数的信息。

下表列出了由 MethodBase 类型公开的成员。

受保护的构造函数

  名称 说明
Protected method Supported by the .NET Compact Framework MethodBase 初始化 MethodBase 类的新实例。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework Attributes 获取与此方法关联的属性。
Public property Supported by the .NET Compact Framework CallingConvention 获取一个值,该值指示此方法的调用约定。
Public property Supported by the .NET Compact Framework ContainsGenericParameters 获取一个值,该值指示泛型方法是否包含未赋值的泛型类型参数。
Public property Supported by the .NET Compact Framework DeclaringType  获取声明该成员的类。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework IsAbstract 获取一个值,该值指示此方法是否为抽象方法。
Public property Supported by the .NET Compact Framework IsAssembly 获取一个值,该值指示此方法是否可以由同一程序集中的其他类调用。
Public property Supported by the .NET Compact Framework IsConstructor 获取一个值,该值指示此方法是否为构造函数。
Public property Supported by the .NET Compact Framework IsFamily 获取一个值,该值指示对此方法的访问是否只限于此类的成员和它的派生类的成员。
Public property Supported by the .NET Compact Framework IsFamilyAndAssembly 获取一个值,该值指示此方法是否可以由同一程序集中的派生类调用。
Public property Supported by the .NET Compact Framework IsFamilyOrAssembly 获取一个值,该值指示此方法是否可以由派生类(与它们的位置无关)和同一程序集中的所有类调用。
Public property Supported by the .NET Compact Framework IsFinal 获取一个值,该值指示此方法是否为 final
Public property Supported by the .NET Compact Framework IsGenericMethod 获取一个值,该值指示方法是否为泛型方法。
Public property Supported by the .NET Compact Framework IsGenericMethodDefinition 获取一个值,该值指示方法是否为泛型方法定义。
Public property Supported by the .NET Compact Framework IsHideBySig 获取一个值,该值指示是否只有一个签名完全相同的同一种类的成员在派生类中是隐藏的。
Public property Supported by the .NET Compact Framework IsPrivate 获取一个值,该值指示此成员是否是私有的。
Public property Supported by the .NET Compact Framework IsPublic 获取一个值,该值指示这是否是一个公共方法。
Public property Supported by the .NET Compact Framework IsSpecialName 获取一个值,该值指示此方法是否具有特殊名称。
Public property Supported by the .NET Compact Framework IsStatic 获取一个值,该值指示方法是否为 static
Public property Supported by the .NET Compact Framework IsVirtual 获取一个值,该值指示方法是否为 virtual
Public property Supported by the .NET Compact Framework MemberType  在派生类中被重写时,获取一个 MemberTypes 值,指示此成员的类型(方法、构造函数和事件等)。(从 MemberInfo 继承。)
Public property MetadataToken  获取一个值,该值标识元数据元素。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework MethodHandle 获取方法的内部元数据表示形式的句柄。
Public property Module  获取一个模块,在该模块中已经定义一个类型,该类型用于声明由当前 MemberInfo 表示的成员。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework Name  获取当前成员的名称。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework ReflectedType  获取用于获取 MemberInfo 的此实例的类对象。(从 MemberInfo 继承。)

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Static GetCurrentMethod 返回表示当前正在执行的方法的 MethodBase 对象。
Public method Supported by the .NET Compact Framework GetCustomAttributes  已重载。 在派生类中被重写时,返回应用于此成员的所有属性。 (从 MemberInfo 继承。)
Public method Supported by the .NET Compact Framework GetGenericArguments 返回 Type 对象的数组,这些对象表示泛型方法的类型变量或泛型方法定义的类型参数。
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method GetMethodBody 在派生类中重写后,获取 MethodBody 对象,该对象提供对 MSIL 流、局部变量和当前方法的异常的访问。
Public method Static Supported by the .NET Compact Framework GetMethodFromHandle 已重载。 使用指定句柄获取方法信息。
Public method GetMethodImplementationFlags 当在派生类中重写时,返回 MethodImplAttributes 标志。
Public method Supported by the .NET Compact Framework GetParameters 当在派生类中重写时,获取指定的方法或构造函数的参数。
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework Invoke 已重载。 调用由此 MethodInfo 实例反射的方法或构造函数。
Public method Supported by the .NET Compact Framework IsDefined  在派生类中被重写时,指示是否 attributeType 的一个或多个实例应用于此成员。 (从 MemberInfo 继承。)
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method System.Runtime.InteropServices._MethodBase.GetIDsOfNames 将一组名称映射为对应的一组调度标识符。
Explicit interface implementation Method System.Runtime.InteropServices._MethodBase.GetType 有关此成员的说明,请参见 _MethodBase.GetType
Explicit interface implementation Method System.Runtime.InteropServices._MethodBase.GetTypeInfo 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。
Explicit interface implementation Method System.Runtime.InteropServices._MethodBase.GetTypeInfoCount 检索对象提供的类型信息接口的数量(0 或 1)。
Explicit interface implementation Method System.Runtime.InteropServices._MethodBase.Invoke 提供对某一对象公开的属性和方法的访问。
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsAbstract 有关此成员的说明,请参见 _MethodBase.IsAbstract
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsAssembly 有关此成员的说明,请参见 _MethodBase.IsAssembly
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsConstructor 有关此成员的说明,请参见 _MethodBase.IsConstructor
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsFamily 有关此成员的说明,请参见 _MethodBase.IsFamily
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsFamilyAndAssembly 有关此成员的说明,请参见 _MethodBase.IsFamilyAndAssembly
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsFamilyOrAssembly 有关此成员的说明,请参见 _MethodBase.IsFamilyOrAssembly
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsFinal 有关此成员的说明,请参见 _MethodBase.IsFinal
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsHideBySig 有关此成员的说明,请参见 _MethodBase.IsHideBySig
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsPrivate 有关此成员的说明,请参见 _MethodBase.IsPrivate
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsPublic 有关此成员的说明,请参见 _MethodBase.IsPublic
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsSpecialName 有关此成员的说明,请参见 _MethodBase.IsSpecialName
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsStatic 有关此成员的说明,请参见 _MethodBase.IsStatic
Explicit interface implementation Property System.Runtime.InteropServices._MethodBase.IsVirtual 有关此成员的说明,请参见 _MethodBase.IsVirtual

页首

请参见

参考

MethodBase 类
System.Reflection 命名空间