TypeDescriptor.GetReflectionType Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Returnerar en Type som kan användas för att utföra reflektion.
Överlagringar
| Name | Description |
|---|---|
| GetReflectionType(Object) |
Returnerar en Type som kan användas för att utföra reflektion, givet ett objekt. |
| GetReflectionType(Type) |
Returnerar en Type som kan användas för att utföra reflektion, givet en klasstyp. |
GetReflectionType(Object)
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
Returnerar en Type som kan användas för att utföra reflektion, givet ett objekt.
public:
static Type ^ GetReflectionType(System::Object ^ instance);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("GetReflectionType is not trim compatible because the Type of object cannot be statically discovered.")]
public static Type GetReflectionType(object instance);
public static Type GetReflectionType(object instance);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("GetReflectionType is not trim compatible because the Type of object cannot be statically discovered.")>]
static member GetReflectionType : obj -> Type
static member GetReflectionType : obj -> Type
Public Shared Function GetReflectionType (instance As Object) As Type
Parametrar
- instance
- Object
En instans av målkomponenten.
Returer
A Type för det angivna objektet.
- Attribut
Undantag
instance är null.
Kommentarer
Metoden GetReflectionType är en lågnivåversion av GetTypeDescriptor metoden. GetReflectionType används vanligtvis för att utföra standardreflektion mot ett objekt när ingen anpassad typbeskrivning kan finnas för det.
Se även
Gäller för
GetReflectionType(Type)
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
Returnerar en Type som kan användas för att utföra reflektion, givet en klasstyp.
public:
static Type ^ GetReflectionType(Type ^ type);
public static Type GetReflectionType(Type type);
static member GetReflectionType : Type -> Type
Public Shared Function GetReflectionType (type As Type) As Type
Parametrar
Returer
A Type av den angivna klassen.
Undantag
type är null.
Kommentarer
Metoden GetReflectionType är en lågnivåversion av GetTypeDescriptor metoden. GetReflectionType används vanligtvis för att utföra standardreflektion mot en klass när ingen anpassad typbeskrivning kan finnas för den.