TypeInfo TypeInfo TypeInfo TypeInfo Class

定義

代表下列各項的類型宣告:類別類型、介面類型、陣列類型、值類型、列舉類型、型別參數、泛型類型定義,以及開放式或封閉式的建構泛型類型。Represents type declarations for class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types.

public ref class TypeInfo abstract : Type, System::Reflection::IReflectableType
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public abstract class TypeInfo : Type, System.Reflection.IReflectableType
type TypeInfo = class
    inherit Type
    interface IReflectableType
Public MustInherit Class TypeInfo
Inherits Type
Implements IReflectableType
繼承
屬性
實作

範例

這個範例會使用適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps子集中的反映類型和成員來抓取Calendar類型的方法和屬性,包括繼承的方法和屬性。This example uses the reflection types and members in the 適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps subset to retrieve the methods and properties of the Calendar type, including inherited methods and properties. 若要執行此程式碼,請將它貼到包含Windows 8.x 市集Windows 8.x Store名為textblock1Textblock控制項的 XAML 應用程式的程式碼檔案中。To run this code, paste it into the code file for a Windows 8.x 市集Windows 8.x Store XAML app that contains a Windows.UI.Xaml.Controls.Textblock control named textblock1.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Navigation;
using System.Reflection;
using System.Globalization;
using System.Text;


namespace Reflection
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
           this.InitializeComponent();
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            TypeInfo t = typeof(Calendar).GetTypeInfo();
            IEnumerable<PropertyInfo> pList = t.DeclaredProperties;
            IEnumerable<MethodInfo> mList = t.DeclaredMethods;

            StringBuilder sb = new StringBuilder();
           
            sb.Append("Properties:");
            foreach (PropertyInfo p in pList)
            {

                sb.Append("\n" + p.DeclaringType.Name + ": " + p.Name);
            }
            sb.Append("\nMethods:");
            foreach (MethodInfo m in mList)
            {
                sb.Append("\n" + m.DeclaringType.Name + ": " + m.Name);
            }
            
            textblock1.Text = sb.ToString();

        }
    }
}
Imports Windows.UI.Xaml.Navigation
Imports System.Reflection
Imports System.Globalization
Imports System.Text

Public NotInheritable Class MainPage
    Inherits Page

    Protected Overrides Sub OnNavigatedTo(e As NavigationEventArgs)
        Dim t As TypeInfo = GetType(Calendar).GetTypeInfo()
        Dim pList As IEnumerable(Of PropertyInfo) = t.DeclaredProperties
        Dim mList As IEnumerable(Of MethodInfo) = t.DeclaredMethods

        Dim sb As New StringBuilder()

        sb.Append("Properties:")
        For Each p As PropertyInfo In pList

            sb.Append((vbLf + p.DeclaringType.Name & ": ") + p.Name)
        Next
        sb.Append(vbLf & "Methods:")
        For Each m As MethodInfo In mList
            sb.Append((vbLf + m.DeclaringType.Name & ": ") + m.Name)
        Next

        textblock1.Text = sb.ToString()

    End Sub
End Class

備註

從開始TypeInfo ,類別會包含在子集內,以用於建立WindowsStore應用程式。適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps .NET Framework 4.5.NET Framework 4.5Starting with the .NET Framework 4.5.NET Framework 4.5, the TypeInfo class is included in the 適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps subset for use in creating Windows Store apps. TypeInfo完整 .NET Framework 也提供。TypeInfo is available in the full .NET Framework as well. 如需有關反映 Windows Store 應用程式的詳細資訊,請參閱 MSDN Library 中適用于 windows Store 應用程式的 Windows 開發人員中心和 .NET Framework 反映中的system.object 命名空間(英文)。For more information about reflection for Windows Store apps, see System.Reflection namespaces in the Windows Dev Center and Reflection in the .NET Framework for Windows Store Apps in the MSDN Library.

TypeInfo包含Type類別中的許多可用成員,以及適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps中的許多反映屬性會傳回TypeInfo物件的集合。TypeInfo contains many of the members available in the Type class, and many of the reflection properties in the 適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps return collections of TypeInfo objects. 若要TypeInfo Type從物件取得物件,請使用IntrospectionExtensions.GetTypeInfo(Type)擴充方法。To get a TypeInfo object from a Type object, use the IntrospectionExtensions.GetTypeInfo(Type) extension method.

物件代表型別定義本身, Type而物件則代表型別定義的參考。 TypeInfoA TypeInfo object represents the type definition itself, whereas a Type object represents a reference to the type definition. TypeInfo取得物件會強制載入包含該類型的元件。Getting a TypeInfo object forces the assembly that contains that type to load. 相較之下,您可以Type操控物件,而不需要執行時間載入所參考的元件。In comparison, you can manipulate Type objects without necessarily requiring the runtime to load the assembly they reference.

在中TypeInfo IEnumerable<T> ,您可以使用傳回集合的反映屬性,而不是傳回陣列的方法。 適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store appsIn the 適用於 Windows 8.x 市集應用程式的 .NET.NET for Windows 8.x Store apps, you use the reflection properties of TypeInfo that return IEnumerable<T> collections instead of methods that return arrays. 例如,您可以使用DeclaredMembers屬性來取得所有宣告的成員, DeclaredProperties或使用屬性來取得所有宣告的屬性。For example, use the DeclaredMembers property to get all declared members, or the DeclaredProperties property to get all declared properties. 反映內容可以針對大型組件或類型實作這些集合的消極式周遊。Reflection contexts can implement lazy traversal of these collections for large assemblies or types. 若要取得特定成員,請使用GetDeclaredMethodGetDeclaredProperty之類的方法,並傳遞您想要取得的方法或屬性名稱。To get specific members, use methods such as GetDeclaredMethod and GetDeclaredProperty, and pass the name of the method or property you would like to retrieve.

若要篩選TypeInfo屬性的結果,請使用 LINQ 查詢。To filter the results of TypeInfo properties, use LINQ queries. 針對源自執行時間的反映物件(例如,做為的結果typeof(Object)),您可以使用RuntimeReflectionExtensions類別中的方法來流覽繼承樹狀結構。For reflection objects that originate with the runtime (for example, as the result of typeof(Object)), you can traverse the inheritance tree by using the methods in the RuntimeReflectionExtensions class. 來自自訂反映內容之物件的取用者不能使用這些方法,而且必須跨越繼承樹狀結構本身。Consumers of objects from customized reflection contexts cannot use these methods and must traverse the inheritance tree themselves.

建構函式

TypeInfo() TypeInfo() TypeInfo() TypeInfo()

初始化 TypeInfo 執行個體。Initializes a TypeInfo instance.

屬性

Assembly Assembly Assembly Assembly
AssemblyQualifiedName AssemblyQualifiedName AssemblyQualifiedName AssemblyQualifiedName
Attributes Attributes Attributes Attributes
BaseType BaseType BaseType BaseType
ContainsGenericParameters ContainsGenericParameters ContainsGenericParameters ContainsGenericParameters
CustomAttributes CustomAttributes CustomAttributes CustomAttributes

取得包含此成員之自訂屬性的集合。Gets a collection that contains this member's custom attributes.

(Inherited from MemberInfo)
DeclaredConstructors DeclaredConstructors DeclaredConstructors DeclaredConstructors

取得目前類型所宣告之建構函式的集合。Gets a collection of the constructors declared by the current type.

DeclaredEvents DeclaredEvents DeclaredEvents DeclaredEvents

取得目前類型所定義之事件的集合。Gets a collection of the events defined by the current type.

DeclaredFields DeclaredFields DeclaredFields DeclaredFields

取得目前類型所定義之欄位的集合。Gets a collection of the fields defined by the current type.

DeclaredMembers DeclaredMembers DeclaredMembers DeclaredMembers

取得目前類型所定義之成員的集合。Gets a collection of the members defined by the current type.

DeclaredMethods DeclaredMethods DeclaredMethods DeclaredMethods

取得目前類型所定義之方法的集合。Gets a collection of the methods defined by the current type.

DeclaredNestedTypes DeclaredNestedTypes DeclaredNestedTypes DeclaredNestedTypes

取得目前類型所定義之巢狀類型的集合。Gets a collection of the nested types defined by the current type.

DeclaredProperties DeclaredProperties DeclaredProperties DeclaredProperties

取得目前類型所定義之屬性的集合。Gets a collection of the properties defined by the current type.

DeclaringMethod DeclaringMethod DeclaringMethod DeclaringMethod
DeclaringType DeclaringType DeclaringType DeclaringType

取得宣告目前巢狀類型或泛型型別參數的類型。Gets the type that declares the current nested type or generic type parameter.

(Inherited from Type)
FullName FullName FullName FullName
GenericParameterAttributes GenericParameterAttributes GenericParameterAttributes GenericParameterAttributes
GenericParameterPosition GenericParameterPosition GenericParameterPosition GenericParameterPosition
GenericTypeArguments GenericTypeArguments GenericTypeArguments GenericTypeArguments
GenericTypeParameters GenericTypeParameters GenericTypeParameters GenericTypeParameters

取得目前執行個體之泛型類型的陣列。Gets an array of the generic type parameters of the current instance.

GUID GUID GUID GUID
HasElementType HasElementType HasElementType HasElementType
ImplementedInterfaces ImplementedInterfaces ImplementedInterfaces ImplementedInterfaces

取得目前類型所實作之介面的集合。Gets a collection of the interfaces implemented by the current type.

IsAbstract IsAbstract IsAbstract IsAbstract
IsAnsiClass IsAnsiClass IsAnsiClass IsAnsiClass
IsArray IsArray IsArray IsArray
IsAutoClass IsAutoClass IsAutoClass IsAutoClass
IsAutoLayout IsAutoLayout IsAutoLayout IsAutoLayout
IsByRef IsByRef IsByRef IsByRef
IsByRefLike IsByRefLike IsByRefLike IsByRefLike Inherited from Type
IsClass IsClass IsClass IsClass
IsCollectible IsCollectible IsCollectible IsCollectible

取得指出此 MemberInfo 物件是否為可回收 AssemblyLoadContext 中保存之組件一部分的值。Gets a value that indicates whether this MemberInfo object is part of an assembly held in a collectible AssemblyLoadContext.

(Inherited from MemberInfo)
IsCOMObject IsCOMObject IsCOMObject IsCOMObject
IsConstructedGenericType IsConstructedGenericType IsConstructedGenericType IsConstructedGenericType

取得值,指出這個物件是否表示建構的泛型類型。Gets a value that indicates whether this object represents a constructed generic type. 您可以建立已建構之泛型類型的執行個體。You can create instances of a constructed generic type.

(Inherited from Type)
IsContextful IsContextful IsContextful IsContextful

取得值,指出在內容中是否可以裝載 TypeGets a value indicating whether the Type can be hosted in a context.

(Inherited from Type)
IsEnum IsEnum IsEnum IsEnum
IsExplicitLayout IsExplicitLayout IsExplicitLayout IsExplicitLayout
IsGenericMethodParameter IsGenericMethodParameter IsGenericMethodParameter IsGenericMethodParameter Inherited from Type
IsGenericParameter IsGenericParameter IsGenericParameter IsGenericParameter
IsGenericType IsGenericType IsGenericType IsGenericType
IsGenericTypeDefinition IsGenericTypeDefinition IsGenericTypeDefinition IsGenericTypeDefinition
IsGenericTypeParameter IsGenericTypeParameter IsGenericTypeParameter IsGenericTypeParameter Inherited from Type
IsImport IsImport IsImport IsImport
IsInterface IsInterface IsInterface IsInterface
IsLayoutSequential IsLayoutSequential IsLayoutSequential IsLayoutSequential
IsMarshalByRef IsMarshalByRef IsMarshalByRef IsMarshalByRef
IsNested IsNested IsNested IsNested
IsNestedAssembly IsNestedAssembly IsNestedAssembly IsNestedAssembly
IsNestedFamANDAssem IsNestedFamANDAssem IsNestedFamANDAssem IsNestedFamANDAssem
IsNestedFamily IsNestedFamily IsNestedFamily IsNestedFamily
IsNestedFamORAssem IsNestedFamORAssem IsNestedFamORAssem IsNestedFamORAssem
IsNestedPrivate IsNestedPrivate IsNestedPrivate IsNestedPrivate
IsNestedPublic IsNestedPublic IsNestedPublic IsNestedPublic
IsNotPublic IsNotPublic IsNotPublic IsNotPublic
IsPointer IsPointer IsPointer IsPointer
IsPrimitive IsPrimitive IsPrimitive IsPrimitive
IsPublic IsPublic IsPublic IsPublic
IsSealed IsSealed IsSealed IsSealed
IsSecurityCritical IsSecurityCritical IsSecurityCritical IsSecurityCritical

取得值,這個值表示目前類型在目前信任層級上是否為安全性關鍵或安全性安全關鍵,因而可以執行重要的作業。Gets a value that indicates whether the current type is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.

(Inherited from Type)
IsSecuritySafeCritical IsSecuritySafeCritical IsSecuritySafeCritical IsSecuritySafeCritical

取得值,這個值表示目前類型在目前信任層級上是否為安全性安全關鍵,也就是說,它是否能執行重要作業並由安全性透明的程式碼存取。Gets a value that indicates whether the current type is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code.

(Inherited from Type)
IsSecurityTransparent IsSecurityTransparent IsSecurityTransparent IsSecurityTransparent

取得值,這個值表示目前類型在目前信任層級上是否為透明,因此無法執行重要作業。Gets a value that indicates whether the current type is transparent at the current trust level, and therefore cannot perform critical operations.

(Inherited from Type)
IsSerializable IsSerializable IsSerializable IsSerializable
IsSignatureType IsSignatureType IsSignatureType IsSignatureType Inherited from Type
IsSpecialName IsSpecialName IsSpecialName IsSpecialName
IsSZArray IsSZArray IsSZArray IsSZArray Inherited from Type
IsTypeDefinition IsTypeDefinition IsTypeDefinition IsTypeDefinition Inherited from Type
IsUnicodeClass IsUnicodeClass IsUnicodeClass IsUnicodeClass
IsValueType IsValueType IsValueType IsValueType
IsVariableBoundArray IsVariableBoundArray IsVariableBoundArray IsVariableBoundArray Inherited from Type
IsVisible IsVisible IsVisible IsVisible
MemberType MemberType MemberType MemberType
MetadataToken MetadataToken MetadataToken MetadataToken

取得值,這個值可識別中繼資料項目。Gets a value that identifies a metadata element.

(Inherited from MemberInfo)
Module Module Module Module

在已定義的目前 Type 中取得模組 (DLL)。Gets the module (the DLL) in which the current Type is defined.

(Inherited from Type)
Name Name Name Name

在衍生類別中覆寫時,取得目前類型的名稱。When overridden in a derived class, gets the name of the current type.

(Inherited from Type)
Namespace Namespace Namespace Namespace
ReflectedType ReflectedType ReflectedType ReflectedType

取得用來取得這個成員的類別物件。Gets the class object that was used to obtain this member.

(Inherited from Type)
StructLayoutAttribute StructLayoutAttribute StructLayoutAttribute StructLayoutAttribute
TypeHandle TypeHandle TypeHandle TypeHandle

取得目前 Type 的控制代碼。Gets the handle for the current Type.

(Inherited from Type)
TypeInitializer TypeInitializer TypeInitializer TypeInitializer
UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType

方法

AsType() AsType() AsType() AsType()

Type 物件方式傳回目前類型。Returns the current type as a Type object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷目前 Type 物件的基礎系統類型,是否與指定的 Object 的基礎系統類型相同。Determines if the underlying system type of the current Type object is the same as the underlying system type of the specified Object.

(Inherited from Type)
Equals(Type) Equals(Type) Equals(Type) Equals(Type)

判斷目前 Type 的基礎系統類型,是否與指定的 Type 之基礎系統類型相同。Determines if the underlying system type of the current Type is the same as the underlying system type of the specified Type.

(Inherited from Type)
FindInterfaces(TypeFilter, Object) FindInterfaces(TypeFilter, Object) FindInterfaces(TypeFilter, Object) FindInterfaces(TypeFilter, Object)
FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) FindMembers(MemberTypes, BindingFlags, MemberFilter, Object)
GetArrayRank() GetArrayRank() GetArrayRank() GetArrayRank()
GetAttributeFlagsImpl() GetAttributeFlagsImpl() GetAttributeFlagsImpl() GetAttributeFlagsImpl()

在衍生類別中覆寫時,實作 Attributes 屬性 (Property) 並取得列舉值的位元組合,以指出與 Type 建立關聯的屬性 (Attribute)。When overridden in a derived class, implements the Attributes property and gets a bitwise combination of enumeration values that indicate the attributes associated with the Type.

(Inherited from Type)
GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

使用指定的繫結條件約束和指定的呼叫慣例,搜尋其參數符合指定的引數類型和修飾詞的建構函式。Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.

(Inherited from Type)
GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[]) GetConstructor(BindingFlags, Binder, Type[], ParameterModifier[])

使用指定的繫結條件約束 (Constraint) 搜尋其參數符合指定的引數類型和修飾詞 (Modifier) 的建構函式。Searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints.

(Inherited from Type)
GetConstructor(Type[]) GetConstructor(Type[]) GetConstructor(Type[]) GetConstructor(Type[])
GetConstructorImpl(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetConstructorImpl(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetConstructorImpl(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetConstructorImpl(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

在衍生類別中覆寫時,使用指定的繫結條件約束和指定的呼叫慣例,搜尋其參數符合指定的引數類型和修飾詞的建構函式。When overridden in a derived class, searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.

(Inherited from Type)
GetConstructors() GetConstructors() GetConstructors() GetConstructors()
GetConstructors(BindingFlags) GetConstructors(BindingFlags) GetConstructors(BindingFlags) GetConstructors(BindingFlags)
GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

在衍生類別中覆寫時,傳回套用至此成員之所有自訂屬性的陣列。When overridden in a derived class, returns an array of all custom attributes applied to this member.

(Inherited from MemberInfo)
GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean) GetCustomAttributes(Type, Boolean)

當在衍生的類別中覆寫時,會傳回套用至這個成員的自訂屬性陣列,並以 Type 識別。When overridden in a derived class, returns an array of custom attributes applied to this member and identified by Type.

(Inherited from MemberInfo)
GetCustomAttributesData() GetCustomAttributesData() GetCustomAttributesData() GetCustomAttributesData()

傳回 CustomAttributeData 物件的清單,表示已套用至目標成員之屬性的資料。Returns a list of CustomAttributeData objects representing data about the attributes that have been applied to the target member.

(Inherited from MemberInfo)
GetDeclaredEvent(String) GetDeclaredEvent(String) GetDeclaredEvent(String) GetDeclaredEvent(String)

傳回物件,此物件代表目前類型所宣告的指定公用事件。Returns an object that represents the specified public event declared by the current type.

GetDeclaredField(String) GetDeclaredField(String) GetDeclaredField(String) GetDeclaredField(String)

傳回物件,此物件代表目前類型所宣告的指定公用欄位。Returns an object that represents the specified public field declared by the current type.

GetDeclaredMethod(String) GetDeclaredMethod(String) GetDeclaredMethod(String) GetDeclaredMethod(String)

傳回物件,此物件代表目前類型所宣告的指定公用方法。Returns an object that represents the specified public method declared by the current type.

GetDeclaredMethods(String) GetDeclaredMethods(String) GetDeclaredMethods(String) GetDeclaredMethods(String)

傳回集合,其中包含所有在目前類型宣告之所有公用方法中符合指定名稱者。Returns a collection that contains all public methods declared on the current type that match the specified name.

GetDeclaredNestedType(String) GetDeclaredNestedType(String) GetDeclaredNestedType(String) GetDeclaredNestedType(String)

傳回物件,此物件代表目前類型所宣告的指定公用巢狀類型。Returns an object that represents the specified public nested type declared by the current type.

GetDeclaredProperty(String) GetDeclaredProperty(String) GetDeclaredProperty(String) GetDeclaredProperty(String)

傳回物件,此物件代表目前類型所宣告的指定公用屬性。Returns an object that represents the specified public property declared by the current type.

GetDefaultMembers() GetDefaultMembers() GetDefaultMembers() GetDefaultMembers()
GetElementType() GetElementType() GetElementType() GetElementType()
GetEnumName(Object) GetEnumName(Object) GetEnumName(Object) GetEnumName(Object)
GetEnumNames() GetEnumNames() GetEnumNames() GetEnumNames()
GetEnumUnderlyingType() GetEnumUnderlyingType() GetEnumUnderlyingType() GetEnumUnderlyingType()
GetEnumValues() GetEnumValues() GetEnumValues() GetEnumValues()
GetEvent(String) GetEvent(String) GetEvent(String) GetEvent(String)
GetEvent(String, BindingFlags) GetEvent(String, BindingFlags) GetEvent(String, BindingFlags) GetEvent(String, BindingFlags)
GetEvents() GetEvents() GetEvents() GetEvents()
GetEvents(BindingFlags) GetEvents(BindingFlags) GetEvents(BindingFlags) GetEvents(BindingFlags)
GetField(String) GetField(String) GetField(String) GetField(String)
GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags)
GetFields() GetFields() GetFields() GetFields()
GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags)
GetGenericArguments() GetGenericArguments() GetGenericArguments() GetGenericArguments()
GetGenericParameterConstraints() GetGenericParameterConstraints() GetGenericParameterConstraints() GetGenericParameterConstraints()
GetGenericTypeDefinition() GetGenericTypeDefinition() GetGenericTypeDefinition() GetGenericTypeDefinition()
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個執行個體的雜湊碼。Returns the hash code for this instance.

(Inherited from Type)
GetInterface(String) GetInterface(String) GetInterface(String) GetInterface(String)
GetInterface(String, Boolean) GetInterface(String, Boolean) GetInterface(String, Boolean) GetInterface(String, Boolean)
GetInterfaceMap(Type) GetInterfaceMap(Type) GetInterfaceMap(Type) GetInterfaceMap(Type)

傳回指定介面類型的介面對應。Returns an interface mapping for the specified interface type.

(Inherited from Type)
GetInterfaces() GetInterfaces() GetInterfaces() GetInterfaces()
GetMember(String) GetMember(String) GetMember(String) GetMember(String)
GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags)
GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags)
GetMembers() GetMembers() GetMembers() GetMembers()
GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)
GetMethod(String) GetMethod(String) GetMethod(String) GetMethod(String)
GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags)
GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

使用指定的繫結條件約束和指定的呼叫慣例,來搜尋指定的方法,而該方法的參數符合指定的引數類型和修飾詞。Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.

(Inherited from Type)
GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])

使用指定的繫結條件約束搜尋指定的方法,而該方法的參數符合指定的引數類型和修飾詞。Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints.

(Inherited from Type)
GetMethod(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethod(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethod(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethod(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) Inherited from Type
GetMethod(String, Int32, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, Int32, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, Int32, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, Int32, BindingFlags, Binder, Type[], ParameterModifier[]) Inherited from Type
GetMethod(String, Int32, Type[]) GetMethod(String, Int32, Type[]) GetMethod(String, Int32, Type[]) GetMethod(String, Int32, Type[]) Inherited from Type
GetMethod(String, Int32, Type[], ParameterModifier[]) GetMethod(String, Int32, Type[], ParameterModifier[]) GetMethod(String, Int32, Type[], ParameterModifier[]) GetMethod(String, Int32, Type[], ParameterModifier[]) Inherited from Type
GetMethod(String, Type[]) GetMethod(String, Type[]) GetMethod(String, Type[]) GetMethod(String, Type[])
GetMethod(String, Type[], ParameterModifier[]) GetMethod(String, Type[], ParameterModifier[]) GetMethod(String, Type[], ParameterModifier[]) GetMethod(String, Type[], ParameterModifier[])
GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

在衍生類別中覆寫時,使用指定的繫結條件約束和指定的呼叫慣例搜尋指定的方法,而該方法的參數符合指定的引數類型和修飾詞。When overridden in a derived class, searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.

(Inherited from Type)
GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) Inherited from Type
GetMethods() GetMethods() GetMethods() GetMethods()
GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags)
GetNestedType(String) GetNestedType(String) GetNestedType(String) GetNestedType(String)
GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags)
GetNestedTypes() GetNestedTypes() GetNestedTypes() GetNestedTypes()
GetNestedTypes(BindingFlags) GetNestedTypes(BindingFlags) GetNestedTypes(BindingFlags) GetNestedTypes(BindingFlags)
GetProperties() GetProperties() GetProperties() GetProperties()
GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags)
GetProperty(String) GetProperty(String) GetProperty(String) GetProperty(String)
GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags)
GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

使用指定的繫結條件約束搜尋指定的屬性,而該屬性的參數符合指定的引數類型和修飾詞。Searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.

(Inherited from Type)
GetProperty(String, Type) GetProperty(String, Type) GetProperty(String, Type) GetProperty(String, Type)
GetProperty(String, Type, Type[]) GetProperty(String, Type, Type[]) GetProperty(String, Type, Type[]) GetProperty(String, Type, Type[])
GetProperty(String, Type, Type[], ParameterModifier[]) GetProperty(String, Type, Type[], ParameterModifier[]) GetProperty(String, Type, Type[], ParameterModifier[]) GetProperty(String, Type, Type[], ParameterModifier[])
GetProperty(String, Type[]) GetProperty(String, Type[]) GetProperty(String, Type[]) GetProperty(String, Type[])
GetPropertyImpl(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetPropertyImpl(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetPropertyImpl(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetPropertyImpl(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

在衍生類別中覆寫時,使用指定的繫結條件約束搜尋指定的屬性,而該屬性的參數符合指定的引數類型和修飾詞的建構函式。When overridden in a derived class, searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.

(Inherited from Type)
GetType() GetType() GetType() GetType()

取得目前的 TypeGets the current Type.

(Inherited from Type)
GetTypeCodeImpl() GetTypeCodeImpl() GetTypeCodeImpl() GetTypeCodeImpl()

傳回此 Type 執行個體的基礎型別碼。Returns the underlying type code of this Type instance.

(Inherited from Type)
HasElementTypeImpl() HasElementTypeImpl() HasElementTypeImpl() HasElementTypeImpl()

在衍生類別中覆寫時,實作 HasElementType 屬性並判斷目前 Type 是否內含或參考其他類型;也就是說,目前 Type 是否為陣列、指標或以傳址方式傳遞。When overridden in a derived class, implements the HasElementType property and determines whether the current Type encompasses or refers to another type; that is, whether the current Type is an array, a pointer, or is passed by reference.

(Inherited from Type)
HasSameMetadataDefinitionAs(MemberInfo) HasSameMetadataDefinitionAs(MemberInfo) HasSameMetadataDefinitionAs(MemberInfo) HasSameMetadataDefinitionAs(MemberInfo) Inherited from MemberInfo
InvokeMember(String, BindingFlags, Binder, Object, Object[]) InvokeMember(String, BindingFlags, Binder, Object, Object[]) InvokeMember(String, BindingFlags, Binder, Object, Object[]) InvokeMember(String, BindingFlags, Binder, Object, Object[])

使用指定的繫結條件約束並符合指定的引數清單,來叫用指定的成員。Invokes the specified member, using the specified binding constraints and matching the specified argument list.

(Inherited from Type)
InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo) InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo) InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo) InvokeMember(String, BindingFlags, Binder, Object, Object[], CultureInfo)

使用指定的繫結條件約束並符合指定的引數清單和文化特性 (Culture) 來叫用指定的成員。Invokes the specified member, using the specified binding constraints and matching the specified argument list and culture.

(Inherited from Type)
InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])

在衍生類別中覆寫時,使用指定的繫結條件約束並符合指定的引數清單、修飾詞和文化特性,來叫用指定的成員。When overridden in a derived class, invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers and culture.

(Inherited from Type)
IsArrayImpl() IsArrayImpl() IsArrayImpl() IsArrayImpl()

在衍生類別中覆寫時,實作 IsArray 屬性並判斷 Type 是否為陣列。When overridden in a derived class, implements the IsArray property and determines whether the Type is an array.

(Inherited from Type)
IsAssignableFrom(Type) IsAssignableFrom(Type) IsAssignableFrom(Type) IsAssignableFrom(Type)
IsAssignableFrom(TypeInfo) IsAssignableFrom(TypeInfo) IsAssignableFrom(TypeInfo) IsAssignableFrom(TypeInfo)

傳回值,這個值表示指定的類型是否可以指派到目前的類型。Returns a value that indicates whether the specified type can be assigned to the current type.

IsByRefImpl() IsByRefImpl() IsByRefImpl() IsByRefImpl()

在衍生類別中覆寫時,實作 IsByRef 屬性並判斷 Type 是否以傳址方式傳遞。When overridden in a derived class, implements the IsByRef property and determines whether the Type is passed by reference.

(Inherited from Type)
IsCOMObjectImpl() IsCOMObjectImpl() IsCOMObjectImpl() IsCOMObjectImpl()

在衍生類別中覆寫時,實作 IsCOMObject 屬性並判斷 Type 是否為 COM 物件。When overridden in a derived class, implements the IsCOMObject property and determines whether the Type is a COM object.

(Inherited from Type)
IsContextfulImpl() IsContextfulImpl() IsContextfulImpl() IsContextfulImpl()

實作 IsContextful 屬性並判斷在內容中是否可以裝載 TypeImplements the IsContextful property and determines whether the Type can be hosted in a context.

(Inherited from Type)
IsDefined(Type, Boolean) IsDefined(Type, Boolean) IsDefined(Type, Boolean) IsDefined(Type, Boolean)

在衍生類別中覆寫時,表示是否已有一個或多個具有指定型別或其衍生型別的屬性套用至這個成員。When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member.

(Inherited from MemberInfo)
IsEnumDefined(Object) IsEnumDefined(Object) IsEnumDefined(Object) IsEnumDefined(Object)
IsEquivalentTo(Type) IsEquivalentTo(Type) IsEquivalentTo(Type) IsEquivalentTo(Type)
IsInstanceOfType(Object) IsInstanceOfType(Object) IsInstanceOfType(Object) IsInstanceOfType(Object)
IsMarshalByRefImpl() IsMarshalByRefImpl() IsMarshalByRefImpl() IsMarshalByRefImpl()

實作 IsMarshalByRef 屬性,判斷 Type 是否以傳址方式封送處理。Implements the IsMarshalByRef property and determines whether the Type is marshaled by reference.

(Inherited from Type)
IsPointerImpl() IsPointerImpl() IsPointerImpl() IsPointerImpl()

在衍生類別中覆寫時,實作 IsPointer 屬性並判斷 Type 是否為指標。When overridden in a derived class, implements the IsPointer property and determines whether the Type is a pointer.

(Inherited from Type)
IsPrimitiveImpl() IsPrimitiveImpl() IsPrimitiveImpl() IsPrimitiveImpl()

在衍生類別中覆寫時,實作 IsPrimitive 屬性並判斷 Type 是否為其中一個基本類型。When overridden in a derived class, implements the IsPrimitive property and determines whether the Type is one of the primitive types.

(Inherited from Type)
IsSubclassOf(Type) IsSubclassOf(Type) IsSubclassOf(Type) IsSubclassOf(Type)
IsValueTypeImpl() IsValueTypeImpl() IsValueTypeImpl() IsValueTypeImpl()

實作 IsValueType 屬性並判斷 Type 是否為實值類型;也就是說,不是類別或介面。Implements the IsValueType property and determines whether the Type is a value type; that is, not a class or an interface.

(Inherited from Type)
MakeArrayType() MakeArrayType() MakeArrayType() MakeArrayType()
MakeArrayType(Int32) MakeArrayType(Int32) MakeArrayType(Int32) MakeArrayType(Int32)
MakeByRefType() MakeByRefType() MakeByRefType() MakeByRefType()
MakeGenericType(Type[]) MakeGenericType(Type[]) MakeGenericType(Type[]) MakeGenericType(Type[])
MakePointerType() MakePointerType() MakePointerType() MakePointerType()
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回表示目前 String 的名稱的 TypeReturns a String representing the name of the current Type.

(Inherited from Type)

明確介面實作

ICustomAttributeProvider.GetCustomAttributes(Boolean) ICustomAttributeProvider.GetCustomAttributes(Boolean) ICustomAttributeProvider.GetCustomAttributes(Boolean) ICustomAttributeProvider.GetCustomAttributes(Boolean) Inherited from MemberInfo
ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) ICustomAttributeProvider.GetCustomAttributes(Type, Boolean) Inherited from MemberInfo
ICustomAttributeProvider.IsDefined(Type, Boolean) ICustomAttributeProvider.IsDefined(Type, Boolean) ICustomAttributeProvider.IsDefined(Type, Boolean) ICustomAttributeProvider.IsDefined(Type, Boolean) Inherited from MemberInfo
IReflectableType.GetTypeInfo() IReflectableType.GetTypeInfo() IReflectableType.GetTypeInfo() IReflectableType.GetTypeInfo()

TypeInfo 物件形式傳回目前類型的表示。Returns a representation of the current type as a TypeInfo object.

_MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _MemberInfo.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from MemberInfo)
_MemberInfo.GetType() _MemberInfo.GetType() _MemberInfo.GetType() _MemberInfo.GetType()

取得 Type 物件,表示 MemberInfo 類別。Gets a Type object representing the MemberInfo class.

(Inherited from MemberInfo)
_MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr) _MemberInfo.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取物件的類型資訊,可以用來取得介面的類型資訊。Retrieves the type information for an object, which can then be used to get the type information for an interface.

(Inherited from MemberInfo)
_MemberInfo.GetTypeInfoCount(UInt32) _MemberInfo.GetTypeInfoCount(UInt32) _MemberInfo.GetTypeInfoCount(UInt32) _MemberInfo.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from MemberInfo)
_MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _MemberInfo.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開的屬性和方法的存取權。Provides access to properties and methods exposed by an object.

(Inherited from MemberInfo)
_Type.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Type.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Type.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _Type.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from Type)
_Type.GetTypeInfo(UInt32, UInt32, IntPtr) _Type.GetTypeInfo(UInt32, UInt32, IntPtr) _Type.GetTypeInfo(UInt32, UInt32, IntPtr) _Type.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取物件的類型資訊,可以用來取得介面的類型資訊。Retrieves the type information for an object, which can then be used to get the type information for an interface.

(Inherited from Type)
_Type.GetTypeInfoCount(UInt32) _Type.GetTypeInfoCount(UInt32) _Type.GetTypeInfoCount(UInt32) _Type.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from Type)
_Type.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Type.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Type.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _Type.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開的屬性和方法的存取權。Provides access to properties and methods exposed by an object.

(Inherited from Type)

擴充方法

GetCustomAttribute(MemberInfo, Type) GetCustomAttribute(MemberInfo, Type) GetCustomAttribute(MemberInfo, Type) GetCustomAttribute(MemberInfo, Type)

擷取指定型別的自訂屬性,此屬性套用至指定成員。Retrieves a custom attribute of a specified type that is applied to a specified member.

GetCustomAttribute(MemberInfo, Type, Boolean) GetCustomAttribute(MemberInfo, Type, Boolean) GetCustomAttribute(MemberInfo, Type, Boolean) GetCustomAttribute(MemberInfo, Type, Boolean)

擷取只訂型別的自訂屬性,此屬性套用至指定成員,並且可選擇性檢查該成員的祖系。Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttribute<T>(MemberInfo) GetCustomAttribute<T>(MemberInfo) GetCustomAttribute<T>(MemberInfo) GetCustomAttribute<T>(MemberInfo)

擷取指定型別的自訂屬性,此屬性套用至指定成員。Retrieves a custom attribute of a specified type that is applied to a specified member.

GetCustomAttribute<T>(MemberInfo, Boolean) GetCustomAttribute<T>(MemberInfo, Boolean) GetCustomAttribute<T>(MemberInfo, Boolean) GetCustomAttribute<T>(MemberInfo, Boolean)

擷取只訂型別的自訂屬性,此屬性套用至指定成員,並且可選擇性檢查該成員的祖系。Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttributes(MemberInfo) GetCustomAttributes(MemberInfo) GetCustomAttributes(MemberInfo) GetCustomAttributes(MemberInfo)

擷取套用至指定成員的自訂屬性集合。Retrieves a collection of custom attributes that are applied to a specified member.

GetCustomAttributes(MemberInfo, Boolean) GetCustomAttributes(MemberInfo, Boolean) GetCustomAttributes(MemberInfo, Boolean) GetCustomAttributes(MemberInfo, Boolean)

擷取自訂屬性集合,此集合套用至指定成員,並且可選擇性檢查該成員的祖系。Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttributes(MemberInfo, Type) GetCustomAttributes(MemberInfo, Type) GetCustomAttributes(MemberInfo, Type) GetCustomAttributes(MemberInfo, Type)

擷取指定型別的自訂屬性集合,此集合套用至指定成員。Retrieves a collection of custom attributes of a specified type that are applied to a specified member.

GetCustomAttributes(MemberInfo, Type, Boolean) GetCustomAttributes(MemberInfo, Type, Boolean) GetCustomAttributes(MemberInfo, Type, Boolean) GetCustomAttributes(MemberInfo, Type, Boolean)

擷取指定型別的自訂屬性集合,此集合套用至指定成員,並且可選擇性檢查該成員的祖系。Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.

GetCustomAttributes<T>(MemberInfo) GetCustomAttributes<T>(MemberInfo) GetCustomAttributes<T>(MemberInfo) GetCustomAttributes<T>(MemberInfo)

擷取指定型別的自訂屬性集合,此集合套用至指定成員。Retrieves a collection of custom attributes of a specified type that are applied to a specified member.

GetCustomAttributes<T>(MemberInfo, Boolean) GetCustomAttributes<T>(MemberInfo, Boolean) GetCustomAttributes<T>(MemberInfo, Boolean) GetCustomAttributes<T>(MemberInfo, Boolean)

擷取指定型別的自訂屬性集合,此集合套用至指定成員,並且可選擇性檢查該成員的祖系。Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.

IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type)

指出是否將所指定型別的自訂屬性套用至指定的成員。Indicates whether custom attributes of a specified type are applied to a specified member.

IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean)

指出指定之型別的自訂屬性是否會套用至指定的成員,以及選擇性地套用到其上階。Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors.

GetTypeInfo(Type) GetTypeInfo(Type) GetTypeInfo(Type) GetTypeInfo(Type)

傳回指定之型別的 TypeInfo 表示。Returns the TypeInfo representation of the specified type.

GetMetadataToken(MemberInfo) GetMetadataToken(MemberInfo) GetMetadataToken(MemberInfo) GetMetadataToken(MemberInfo)

取得指定成員的中繼資料語彙基元 (如果有)。Gets a metadata token for the given member, if available.

HasMetadataToken(MemberInfo) HasMetadataToken(MemberInfo) HasMetadataToken(MemberInfo) HasMetadataToken(MemberInfo)

傳回值,指出所指定成員是否有可用的中繼資料語彙基元。Returns a value that indicates whether a metadata token is available for the specified member.

GetRuntimeEvent(Type, String) GetRuntimeEvent(Type, String) GetRuntimeEvent(Type, String) GetRuntimeEvent(Type, String)

擷取表示指定之事件的物件。Retrieves an object that represents the specified event.

GetRuntimeEvents(Type) GetRuntimeEvents(Type) GetRuntimeEvents(Type) GetRuntimeEvents(Type)

擷取集合,表示指定的型別所定義的所有事件。Retrieves a collection that represents all the events defined on a specified type.

GetRuntimeField(Type, String) GetRuntimeField(Type, String) GetRuntimeField(Type, String) GetRuntimeField(Type, String)

擷取表示指定之欄位的物件。Retrieves an object that represents a specified field.

GetRuntimeFields(Type) GetRuntimeFields(Type) GetRuntimeFields(Type) GetRuntimeFields(Type)

擷取集合,表示指定的型別所定義的所有欄位。Retrieves a collection that represents all the fields defined on a specified type.

GetRuntimeInterfaceMap(TypeInfo, Type) GetRuntimeInterfaceMap(TypeInfo, Type) GetRuntimeInterfaceMap(TypeInfo, Type) GetRuntimeInterfaceMap(TypeInfo, Type)

傳回指定型別和指定介面的介面對應。Returns an interface mapping for the specified type and the specified interface.

GetRuntimeMethod(Type, String, Type[]) GetRuntimeMethod(Type, String, Type[]) GetRuntimeMethod(Type, String, Type[]) GetRuntimeMethod(Type, String, Type[])

擷取表示指定之方法的物件。Retrieves an object that represents a specified method.

GetRuntimeMethods(Type) GetRuntimeMethods(Type) GetRuntimeMethods(Type) GetRuntimeMethods(Type)

擷取集合,表示指定的型別所定義的所有方法。Retrieves a collection that represents all methods defined on a specified type.

GetRuntimeProperties(Type) GetRuntimeProperties(Type) GetRuntimeProperties(Type) GetRuntimeProperties(Type)

擷取集合,表示指定的型別所定義的所有屬性。Retrieves a collection that represents all the properties defined on a specified type.

GetRuntimeProperty(Type, String) GetRuntimeProperty(Type, String) GetRuntimeProperty(Type, String) GetRuntimeProperty(Type, String)

擷取表示指定之屬性的物件。Retrieves an object that represents a specified property.

GetConstructor(Type, Type[]) GetConstructor(Type, Type[]) GetConstructor(Type, Type[]) GetConstructor(Type, Type[])
GetConstructors(Type) GetConstructors(Type) GetConstructors(Type) GetConstructors(Type)
GetConstructors(Type, BindingFlags) GetConstructors(Type, BindingFlags) GetConstructors(Type, BindingFlags) GetConstructors(Type, BindingFlags)
GetDefaultMembers(Type) GetDefaultMembers(Type) GetDefaultMembers(Type) GetDefaultMembers(Type)
GetEvent(Type, String) GetEvent(Type, String) GetEvent(Type, String) GetEvent(Type, String)
GetEvent(Type, String, BindingFlags) GetEvent(Type, String, BindingFlags) GetEvent(Type, String, BindingFlags) GetEvent(Type, String, BindingFlags)
GetEvents(Type) GetEvents(Type) GetEvents(Type) GetEvents(Type)
GetEvents(Type, BindingFlags) GetEvents(Type, BindingFlags) GetEvents(Type, BindingFlags) GetEvents(Type, BindingFlags)
GetField(Type, String) GetField(Type, String) GetField(Type, String) GetField(Type, String)
GetField(Type, String, BindingFlags) GetField(Type, String, BindingFlags) GetField(Type, String, BindingFlags) GetField(Type, String, BindingFlags)
GetFields(Type) GetFields(Type) GetFields(Type) GetFields(Type)
GetFields(Type, BindingFlags) GetFields(Type, BindingFlags) GetFields(Type, BindingFlags) GetFields(Type, BindingFlags)
GetGenericArguments(Type) GetGenericArguments(Type) GetGenericArguments(Type) GetGenericArguments(Type)
GetInterfaces(Type) GetInterfaces(Type) GetInterfaces(Type) GetInterfaces(Type)
GetMember(Type, String) GetMember(Type, String) GetMember(Type, String) GetMember(Type, String)
GetMember(Type, String, BindingFlags) GetMember(Type, String, BindingFlags) GetMember(Type, String, BindingFlags) GetMember(Type, String, BindingFlags)
GetMembers(Type) GetMembers(Type) GetMembers(Type) GetMembers(Type)
GetMembers(Type, BindingFlags) GetMembers(Type, BindingFlags) GetMembers(Type, BindingFlags) GetMembers(Type, BindingFlags)
GetMethod(Type, String) GetMethod(Type, String) GetMethod(Type, String) GetMethod(Type, String)
GetMethod(Type, String, BindingFlags) GetMethod(Type, String, BindingFlags) GetMethod(Type, String, BindingFlags) GetMethod(Type, String, BindingFlags)
GetMethod(Type, String, Type[]) GetMethod(Type, String, Type[]) GetMethod(Type, String, Type[]) GetMethod(Type, String, Type[])
GetMethods(Type) GetMethods(Type) GetMethods(Type) GetMethods(Type)
GetMethods(Type, BindingFlags) GetMethods(Type, BindingFlags) GetMethods(Type, BindingFlags) GetMethods(Type, BindingFlags)
GetNestedType(Type, String, BindingFlags) GetNestedType(Type, String, BindingFlags) GetNestedType(Type, String, BindingFlags) GetNestedType(Type, String, BindingFlags)
GetNestedTypes(Type, BindingFlags) GetNestedTypes(Type, BindingFlags) GetNestedTypes(Type, BindingFlags) GetNestedTypes(Type, BindingFlags)
GetProperties(Type) GetProperties(Type) GetProperties(Type) GetProperties(Type)
GetProperties(Type, BindingFlags) GetProperties(Type, BindingFlags) GetProperties(Type, BindingFlags) GetProperties(Type, BindingFlags)
GetProperty(Type, String) GetProperty(Type, String) GetProperty(Type, String) GetProperty(Type, String)
GetProperty(Type, String, BindingFlags) GetProperty(Type, String, BindingFlags) GetProperty(Type, String, BindingFlags) GetProperty(Type, String, BindingFlags)
GetProperty(Type, String, Type) GetProperty(Type, String, Type) GetProperty(Type, String, Type) GetProperty(Type, String, Type)
GetProperty(Type, String, Type, Type[]) GetProperty(Type, String, Type, Type[]) GetProperty(Type, String, Type, Type[]) GetProperty(Type, String, Type, Type[])
IsAssignableFrom(Type, Type) IsAssignableFrom(Type, Type) IsAssignableFrom(Type, Type) IsAssignableFrom(Type, Type)
IsInstanceOfType(Type, Object) IsInstanceOfType(Type, Object) IsInstanceOfType(Type, Object) IsInstanceOfType(Type, Object)

適用於