GenericTypeParameterBuilder GenericTypeParameterBuilder GenericTypeParameterBuilder GenericTypeParameterBuilder Class

Definizione

Definisce e crea parametri di tipo generico per tipi e metodi generici definiti dinamicamente.Defines and creates generic type parameters for dynamically defined generic types and methods. Questa classe non può essere ereditata.This class cannot be inherited.

public ref class GenericTypeParameterBuilder sealed : System::Reflection::TypeInfo
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class GenericTypeParameterBuilder : System.Reflection.TypeInfo
type GenericTypeParameterBuilder = class
    inherit TypeInfo
Public NotInheritable Class GenericTypeParameterBuilder
Inherits TypeInfo
Ereditarietà
GenericTypeParameterBuilderGenericTypeParameterBuilderGenericTypeParameterBuilderGenericTypeParameterBuilder
Attributi

Esempi

L'esempio di codice seguente crea un tipo generico con due parametri di tipo e li salva nell'assembly GenericEmitExample1. dll.The following code example creates a generic type with two type parameters, and saves them in the assembly GenericEmitExample1.dll. È possibile utilizzare Ildasm. exe (DISASSEMBLER il) per visualizzare i tipi generati.You can use the Ildasm.exe (IL Disassembler) to view the generated types. Per una spiegazione più dettagliata dei passaggi necessari per la definizione di un tipo generico dinamico, vedere Procedura: Definire un tipo generico tramite reflection emit.For a more detailed explanation of the steps involved in defining a dynamic generic type, see How to: Define a Generic Type with Reflection Emit.

using namespace System;
using namespace System::Reflection;
using namespace System::Reflection::Emit;
using namespace System::Collections::Generic;

// Dummy class to satisfy TFirst constraints.
//
public ref class Example {};

// Define a trivial base class and two trivial interfaces 
// to use when demonstrating constraints.
//
public ref class ExampleBase {};
public interface class IExampleA {};
public interface class IExampleB {};

// Define a trivial type that can substitute for type parameter 
// TSecond.
//
public ref class ExampleDerived : ExampleBase, IExampleA, IExampleB {};

// List the constraint flags. The GenericParameterAttributes
// enumeration contains two sets of attributes, variance and
// constraints. For this example, only constraints are used.
//
static void ListConstraintAttributes( Type^ t )
{
   // Mask off the constraint flags. 
   GenericParameterAttributes constraints = 
       t->GenericParameterAttributes & 
       GenericParameterAttributes::SpecialConstraintMask;

   if ((constraints & GenericParameterAttributes::ReferenceTypeConstraint)
           != GenericParameterAttributes::None)
       Console::WriteLine( L"    ReferenceTypeConstraint");

   if ((constraints & GenericParameterAttributes::NotNullableValueTypeConstraint)
           != GenericParameterAttributes::None)
       Console::WriteLine( L"    NotNullableValueTypeConstraint");

   if ((constraints & GenericParameterAttributes::DefaultConstructorConstraint)
           != GenericParameterAttributes::None)
       Console::WriteLine( L"    DefaultConstructorConstraint");
}

static void DisplayGenericParameters( Type^ t )
{
   if (!t->IsGenericType)
   {
       Console::WriteLine( L"Type '{0}' is not generic." );
       return;
   }
   if (!t->IsGenericTypeDefinition)
       t = t->GetGenericTypeDefinition();

   array<Type^>^ typeParameters = t->GetGenericArguments();
   Console::WriteLine( L"\r\nListing {0} type parameters for type '{1}'.", 
       typeParameters->Length, t );

   for each ( Type^ tParam in typeParameters )
   {
       Console::WriteLine( L"\r\nType parameter {0}:", 
           tParam->ToString() );

       for each (Type^ c in tParam->GetGenericParameterConstraints())
       {
           if (c->IsInterface)
               Console::WriteLine( L"    Interface constraint: {0}", c);
           else
               Console::WriteLine( L"    Base type constraint: {0}", c);
       }
       ListConstraintAttributes(tParam);
   }
}

void main()
{
   // Define a dynamic assembly to contain the sample type. The
   // assembly will be run and also saved to disk, so
   // AssemblyBuilderAccess.RunAndSave is specified.
   //
   AppDomain^ myDomain = AppDomain::CurrentDomain;
   AssemblyName^ myAsmName = gcnew AssemblyName( L"GenericEmitExample1" );
   AssemblyBuilder^ myAssembly = myDomain->DefineDynamicAssembly( 
       myAsmName, AssemblyBuilderAccess::RunAndSave );

   // An assembly is made up of executable modules. For a single-
   // module assembly, the module name and file name are the same 
   // as the assembly name. 
   //
   ModuleBuilder^ myModule = myAssembly->DefineDynamicModule( 
       myAsmName->Name, String::Concat( myAsmName->Name, L".dll" ) );

   // Get type objects for the base class trivial interfaces to
   // be used as constraints.
   //
   Type^ baseType = ExampleBase::typeid; 
   Type^ interfaceA = IExampleA::typeid; 
   Type^ interfaceB = IExampleB::typeid;
   
   // Define the sample type.
   //
   TypeBuilder^ myType = myModule->DefineType( L"Sample", 
       TypeAttributes::Public );
   
   Console::WriteLine( L"Type 'Sample' is generic: {0}", 
       myType->IsGenericType );
   
   // Define type parameters for the type. Until you do this, 
   // the type is not generic, as the preceding and following 
   // WriteLine statements show. The type parameter names are
   // specified as an array of strings. To make the code
   // easier to read, each GenericTypeParameterBuilder is placed
   // in a variable with the same name as the type parameter.
   // 
   array<String^>^typeParamNames = {L"TFirst",L"TSecond"};
   array<GenericTypeParameterBuilder^>^typeParams = 
       myType->DefineGenericParameters( typeParamNames );

   GenericTypeParameterBuilder^ TFirst = typeParams[0];
   GenericTypeParameterBuilder^ TSecond = typeParams[1];

   Console::WriteLine( L"Type 'Sample' is generic: {0}", 
       myType->IsGenericType );
   
   // Apply constraints to the type parameters.
   //
   // A type that is substituted for the first parameter, TFirst,
   // must be a reference type and must have a parameterless
   // constructor.
   TFirst->SetGenericParameterAttributes( 
       GenericParameterAttributes::DefaultConstructorConstraint | 
       GenericParameterAttributes::ReferenceTypeConstraint 
   );

   // A type that is substituted for the second type
   // parameter must implement IExampleA and IExampleB, and
   // inherit from the trivial test class ExampleBase. The
   // interface constraints are specified as an array
   // containing the interface types. 
   array<Type^>^interfaceTypes = { interfaceA, interfaceB };
   TSecond->SetInterfaceConstraints( interfaceTypes );
   TSecond->SetBaseTypeConstraint( baseType );

   // The following code adds a private field named ExampleField,
   // of type TFirst.
   FieldBuilder^ exField = 
       myType->DefineField("ExampleField", TFirst, 
           FieldAttributes::Private);

   // Define a static method that takes an array of TFirst and 
   // returns a List<TFirst> containing all the elements of 
   // the array. To define this method it is necessary to create
   // the type List<TFirst> by calling MakeGenericType on the
   // generic type definition, generic<T> List. 
   // The parameter type is created by using the
   // MakeArrayType method. 
   //
   Type^ listOf = List::typeid;
   Type^ listOfTFirst = listOf->MakeGenericType(TFirst);
   array<Type^>^ mParamTypes = { TFirst->MakeArrayType() };

   MethodBuilder^ exMethod = 
       myType->DefineMethod("ExampleMethod", 
           MethodAttributes::Public | MethodAttributes::Static, 
           listOfTFirst, 
           mParamTypes);

   // Emit the method body. 
   // The method body consists of just three opcodes, to load 
   // the input array onto the execution stack, to call the 
   // List<TFirst> constructor that takes IEnumerable<TFirst>,
   // which does all the work of putting the input elements into
   // the list, and to return, leaving the list on the stack. The
   // hard work is getting the constructor.
   // 
   // The GetConstructor method is not supported on a 
   // GenericTypeParameterBuilder, so it is not possible to get 
   // the constructor of List<TFirst> directly. There are two
   // steps, first getting the constructor of generic<T> List and then
   // calling a method that converts it to the corresponding 
   // constructor of List<TFirst>.
   //
   // The constructor needed here is the one that takes an
   // IEnumerable<T>. Note, however, that this is not the 
   // generic type definition of generic<T> IEnumerable; instead, the
   // T from generic<T> List must be substituted for the T of 
   // generic<T> IEnumerable. (This seems confusing only because both
   // types have type parameters named T. That is why this example
   // uses the somewhat silly names TFirst and TSecond.) To get
   // the type of the constructor argument, take the generic
   // type definition generic<T> IEnumerable and 
   // call MakeGenericType with the first generic type parameter
   // of generic<T> List. The constructor argument list must be passed
   // as an array, with just one argument in this case.
   // 
   // Now it is possible to get the constructor of generic<T> List,
   // using GetConstructor on the generic type definition. To get
   // the constructor of List<TFirst>, pass List<TFirst> and
   // the constructor from generic<T> List to the static
   // TypeBuilder.GetConstructor method.
   //
   ILGenerator^ ilgen = exMethod->GetILGenerator();
        
   Type^ ienumOf = IEnumerable::typeid;
   Type^ TfromListOf = listOf->GetGenericArguments()[0];
   Type^ ienumOfT = ienumOf->MakeGenericType(TfromListOf);
   array<Type^>^ ctorArgs = {ienumOfT};

   ConstructorInfo^ ctorPrep = listOf->GetConstructor(ctorArgs);
   ConstructorInfo^ ctor = 
       TypeBuilder::GetConstructor(listOfTFirst, ctorPrep);

   ilgen->Emit(OpCodes::Ldarg_0);
   ilgen->Emit(OpCodes::Newobj, ctor);
   ilgen->Emit(OpCodes::Ret);

   // Create the type and save the assembly. 
   Type^ finished = myType->CreateType();
   myAssembly->Save( String::Concat( myAsmName->Name, L".dll" ) );

   // Invoke the method.
   // ExampleMethod is not generic, but the type it belongs to is
   // generic, so in order to get a MethodInfo that can be invoked
   // it is necessary to create a constructed type. The Example 
   // class satisfies the constraints on TFirst, because it is a 
   // reference type and has a default constructor. In order to
   // have a class that satisfies the constraints on TSecond, 
   // this code example defines the ExampleDerived type. These
   // two types are passed to MakeGenericMethod to create the
   // constructed type.
   //
   array<Type^>^ typeArgs = 
       { Example::typeid, ExampleDerived::typeid };
   Type^ constructed = finished->MakeGenericType(typeArgs);
   MethodInfo^ mi = constructed->GetMethod("ExampleMethod");

   // Create an array of Example objects, as input to the generic
   // method. This array must be passed as the only element of an 
   // array of arguments. The first argument of Invoke is 
   // null, because ExampleMethod is static. Display the count
   // on the resulting List<Example>.
   // 
   array<Example^>^ input = { gcnew Example(), gcnew Example() };
   array<Object^>^ arguments = { input };

   List<Example^>^ listX = 
       (List<Example^>^) mi->Invoke(nullptr, arguments);

   Console::WriteLine(
       "\nThere are {0} elements in the List<Example>.", 
       listX->Count);

   DisplayGenericParameters(finished);
}

/* This code example produces the following output:

Type 'Sample' is generic: False
Type 'Sample' is generic: True

There are 2 elements in the List<Example>.

Listing 2 type parameters for type 'Sample[TFirst,TSecond]'.

Type parameter TFirst:
    ReferenceTypeConstraint
    DefaultConstructorConstraint

Type parameter TSecond:
    Interface constraint: IExampleA
    Interface constraint: IExampleB
    Base type constraint: ExampleBase
 */
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Collections.Generic;

// Define a trivial base class and two trivial interfaces 
// to use when demonstrating constraints.
//
public class ExampleBase {}

public interface IExampleA {}

public interface IExampleB {}

// Define a trivial type that can substitute for type parameter 
// TSecond.
//
public class ExampleDerived : ExampleBase, IExampleA, IExampleB {}


public class Example
{
    public static void Main()
    {
        // Define a dynamic assembly to contain the sample type. The
        // assembly will not be run, but only saved to disk, so
        // AssemblyBuilderAccess.Save is specified.
        //
        AppDomain myDomain = AppDomain.CurrentDomain;
        AssemblyName myAsmName = new AssemblyName("GenericEmitExample1");
        AssemblyBuilder myAssembly = 
            myDomain.DefineDynamicAssembly(myAsmName, 
                AssemblyBuilderAccess.RunAndSave);

        // An assembly is made up of executable modules. For a single-
        // module assembly, the module name and file name are the same 
        // as the assembly name. 
        //
        ModuleBuilder myModule = 
            myAssembly.DefineDynamicModule(myAsmName.Name, 
               myAsmName.Name + ".dll");

        // Get type objects for the base class trivial interfaces to
        // be used as constraints.
        //
        Type baseType = typeof(ExampleBase);
        Type interfaceA = typeof(IExampleA);
        Type interfaceB = typeof(IExampleB);
                
        // Define the sample type.
        //
        TypeBuilder myType = 
            myModule.DefineType("Sample", TypeAttributes.Public);

        Console.WriteLine("Type 'Sample' is generic: {0}", 
            myType.IsGenericType);

        // Define type parameters for the type. Until you do this, 
        // the type is not generic, as the preceding and following 
        // WriteLine statements show. The type parameter names are
        // specified as an array of strings. To make the code
        // easier to read, each GenericTypeParameterBuilder is placed
        // in a variable with the same name as the type parameter.
        // 
        string[] typeParamNames = {"TFirst", "TSecond"};
        GenericTypeParameterBuilder[] typeParams = 
            myType.DefineGenericParameters(typeParamNames);

        GenericTypeParameterBuilder TFirst = typeParams[0];
        GenericTypeParameterBuilder TSecond = typeParams[1];

        Console.WriteLine("Type 'Sample' is generic: {0}", 
            myType.IsGenericType);

        // Apply constraints to the type parameters.
        //
        // A type that is substituted for the first parameter, TFirst,
        // must be a reference type and must have a parameterless
        // constructor.
        TFirst.SetGenericParameterAttributes(
            GenericParameterAttributes.DefaultConstructorConstraint |
            GenericParameterAttributes.ReferenceTypeConstraint);

        // A type that is substituted for the second type
        // parameter must implement IExampleA and IExampleB, and
        // inherit from the trivial test class ExampleBase. The
        // interface constraints are specified as an array 
        // containing the interface types.
        TSecond.SetBaseTypeConstraint(baseType);
        Type[] interfaceTypes = {interfaceA, interfaceB};
        TSecond.SetInterfaceConstraints(interfaceTypes);

        // The following code adds a private field named ExampleField,
        // of type TFirst.
        FieldBuilder exField = 
            myType.DefineField("ExampleField", TFirst, 
                FieldAttributes.Private);

        // Define a static method that takes an array of TFirst and 
        // returns a List<TFirst> containing all the elements of 
        // the array. To define this method it is necessary to create
        // the type List<TFirst> by calling MakeGenericType on the
        // generic type definition, List<T>. (The T is omitted with
        // the typeof operator when you get the generic type 
        // definition.) The parameter type is created by using the
        // MakeArrayType method. 
        //
        Type listOf = typeof(List<>);
        Type listOfTFirst = listOf.MakeGenericType(TFirst);
        Type[] mParamTypes = {TFirst.MakeArrayType()};

        MethodBuilder exMethod = 
            myType.DefineMethod("ExampleMethod", 
                MethodAttributes.Public | MethodAttributes.Static, 
                listOfTFirst, 
                mParamTypes);

        // Emit the method body. 
        // The method body consists of just three opcodes, to load 
        // the input array onto the execution stack, to call the 
        // List<TFirst> constructor that takes IEnumerable<TFirst>,
        // which does all the work of putting the input elements into
        // the list, and to return, leaving the list on the stack. The
        // hard work is getting the constructor.
        // 
        // The GetConstructor method is not supported on a 
        // GenericTypeParameterBuilder, so it is not possible to get 
        // the constructor of List<TFirst> directly. There are two
        // steps, first getting the constructor of List<T> and then
        // calling a method that converts it to the corresponding 
        // constructor of List<TFirst>.
        //
        // The constructor needed here is the one that takes an
        // IEnumerable<T>. Note, however, that this is not the 
        // generic type definition of IEnumerable<T>; instead, the
        // T from List<T> must be substituted for the T of 
        // IEnumerable<T>. (This seems confusing only because both
        // types have type parameters named T. That is why this example
        // uses the somewhat silly names TFirst and TSecond.) To get
        // the type of the constructor argument, take the generic
        // type definition IEnumerable<T> (expressed as 
        // IEnumerable<> when you use the typeof operator) and 
        // call MakeGenericType with the first generic type parameter
        // of List<T>. The constructor argument list must be passed
        // as an array, with just one argument in this case.
        // 
        // Now it is possible to get the constructor of List<T>,
        // using GetConstructor on the generic type definition. To get
        // the constructor of List<TFirst>, pass List<TFirst> and
        // the constructor from List<T> to the static
        // TypeBuilder.GetConstructor method.
        //
        ILGenerator ilgen = exMethod.GetILGenerator();
        
        Type ienumOf = typeof(IEnumerable<>);
        Type TfromListOf = listOf.GetGenericArguments()[0];
        Type ienumOfT = ienumOf.MakeGenericType(TfromListOf);
        Type[] ctorArgs = {ienumOfT};

        ConstructorInfo ctorPrep = listOf.GetConstructor(ctorArgs);
        ConstructorInfo ctor = 
            TypeBuilder.GetConstructor(listOfTFirst, ctorPrep);

        ilgen.Emit(OpCodes.Ldarg_0);
        ilgen.Emit(OpCodes.Newobj, ctor);
        ilgen.Emit(OpCodes.Ret);

        // Create the type and save the assembly. 
        Type finished = myType.CreateType();
        myAssembly.Save(myAsmName.Name+".dll");

        // Invoke the method.
        // ExampleMethod is not generic, but the type it belongs to is
        // generic, so in order to get a MethodInfo that can be invoked
        // it is necessary to create a constructed type. The Example 
        // class satisfies the constraints on TFirst, because it is a 
        // reference type and has a default constructor. In order to
        // have a class that satisfies the constraints on TSecond, 
        // this code example defines the ExampleDerived type. These
        // two types are passed to MakeGenericMethod to create the
        // constructed type.
        //
        Type[] typeArgs = {typeof(Example), typeof(ExampleDerived)};
        Type constructed = finished.MakeGenericType(typeArgs);
        MethodInfo mi = constructed.GetMethod("ExampleMethod");

        // Create an array of Example objects, as input to the generic
        // method. This array must be passed as the only element of an 
        // array of arguments. The first argument of Invoke is 
        // null, because ExampleMethod is static. Display the count
        // on the resulting List<Example>.
        // 
        Example[] input = {new Example(), new Example()};
        object[] arguments = {input};

        List<Example> listX = 
            (List<Example>) mi.Invoke(null, arguments);

        Console.WriteLine(
            "\nThere are {0} elements in the List<Example>.", 
            listX.Count);

        DisplayGenericParameters(finished);
    }

    private static void DisplayGenericParameters(Type t)
    {
        if (!t.IsGenericType)
        {
            Console.WriteLine("Type '{0}' is not generic.");
            return;
        }
        if (!t.IsGenericTypeDefinition) 
        {
            t = t.GetGenericTypeDefinition();
        }

        Type[] typeParameters = t.GetGenericArguments();
        Console.WriteLine("\nListing {0} type parameters for type '{1}'.",
            typeParameters.Length, t);

        foreach( Type tParam in typeParameters )
        {
            Console.WriteLine("\r\nType parameter {0}:", tParam.ToString());

            foreach( Type c in tParam.GetGenericParameterConstraints() )
            {
                if (c.IsInterface)
                {
                    Console.WriteLine("    Interface constraint: {0}", c);
                }
                else
                {
                    Console.WriteLine("    Base type constraint: {0}", c);
                }
            }

            ListConstraintAttributes(tParam);
        }
    }

    // List the constraint flags. The GenericParameterAttributes
    // enumeration contains two sets of attributes, variance and
    // constraints. For this example, only constraints are used.
    //
    private static void ListConstraintAttributes(Type t)
    {
        // Mask off the constraint flags. 
        GenericParameterAttributes constraints = 
            t.GenericParameterAttributes & GenericParameterAttributes.SpecialConstraintMask;

        if ((constraints & GenericParameterAttributes.ReferenceTypeConstraint)
            != GenericParameterAttributes.None) 
        {
            Console.WriteLine("    ReferenceTypeConstraint");
        }

        if ((constraints & GenericParameterAttributes.NotNullableValueTypeConstraint)
            != GenericParameterAttributes.None) 
        {
            Console.WriteLine("    NotNullableValueTypeConstraint");
        }

        if ((constraints & GenericParameterAttributes.DefaultConstructorConstraint)
            !=GenericParameterAttributes.None) 
        {
            Console.WriteLine("    DefaultConstructorConstraint");
        }
    }
}

/* This code example produces the following output:

Type 'Sample' is generic: False
Type 'Sample' is generic: True

There are 2 elements in the List<Example>.

Listing 2 type parameters for type 'Sample[TFirst,TSecond]'.

Type parameter TFirst:
    ReferenceTypeConstraint
    DefaultConstructorConstraint

Type parameter TSecond:
    Interface constraint: IExampleA
    Interface constraint: IExampleB
    Base type constraint: ExampleBase
 */
Imports System.Reflection
Imports System.Reflection.Emit
Imports System.Collections.Generic

' Define a trivial base class and two trivial interfaces 
' to use when demonstrating constraints.
'
Public Class ExampleBase
End Class

Public Interface IExampleA
End Interface

Public Interface IExampleB
End Interface

' Define a trivial type that can substitute for type parameter 
' TSecond.
'
Public Class ExampleDerived
    Inherits ExampleBase
    Implements IExampleA, IExampleB
End Class

Public Class Example
    Public Shared Sub Main()
        ' Define a dynamic assembly to contain the sample type. The
        ' assembly will not be run, but only saved to disk, so
        ' AssemblyBuilderAccess.Save is specified.
        '
        Dim myDomain As AppDomain = AppDomain.CurrentDomain
        Dim myAsmName As New AssemblyName("GenericEmitExample1")
        Dim myAssembly As AssemblyBuilder = myDomain.DefineDynamicAssembly( _
            myAsmName, _
            AssemblyBuilderAccess.RunAndSave)

        ' An assembly is made up of executable modules. For a single-
        ' module assembly, the module name and file name are the same 
        ' as the assembly name. 
        '
        Dim myModule As ModuleBuilder = myAssembly.DefineDynamicModule( _
            myAsmName.Name, _
            myAsmName.Name & ".dll")

        ' Get type objects for the base class trivial interfaces to
        ' be used as constraints.
        '
        Dim baseType As Type = GetType(ExampleBase)
        Dim interfaceA As Type = GetType(IExampleA)
        Dim interfaceB As Type = GetType(IExampleB)
                
        ' Define the sample type.
        '
        Dim myType As TypeBuilder = myModule.DefineType( _
            "Sample", _
            TypeAttributes.Public)

        Console.WriteLine("Type 'Sample' is generic: {0}", _
            myType.IsGenericType)

        ' Define type parameters for the type. Until you do this, 
        ' the type is not generic, as the preceding and following 
        ' WriteLine statements show. The type parameter names are
        ' specified as an array of strings. To make the code
        ' easier to read, each GenericTypeParameterBuilder is placed
        ' in a variable with the same name as the type parameter.
        ' 
        Dim typeParamNames() As String = {"TFirst", "TSecond"}
        Dim typeParams() As GenericTypeParameterBuilder = _
            myType.DefineGenericParameters(typeParamNames)

        Dim TFirst As GenericTypeParameterBuilder = typeParams(0)
        Dim TSecond As GenericTypeParameterBuilder = typeParams(1)

        Console.WriteLine("Type 'Sample' is generic: {0}", _
            myType.IsGenericType)

        ' Apply constraints to the type parameters.
        '
        ' A type that is substituted for the first parameter, TFirst,
        ' must be a reference type and must have a parameterless
        ' constructor.
        TFirst.SetGenericParameterAttributes( _
            GenericParameterAttributes.DefaultConstructorConstraint _
            Or GenericParameterAttributes.ReferenceTypeConstraint)

        ' A type that is substituted for the second type
        ' parameter must implement IExampleA and IExampleB, and
        ' inherit from the trivial test class ExampleBase. The
        ' interface constraints are specified as an array 
        ' containing the interface types.
        TSecond.SetBaseTypeConstraint(baseType)
        Dim interfaceTypes() As Type = {interfaceA, interfaceB}
        TSecond.SetInterfaceConstraints(interfaceTypes)

        ' The following code adds a private field named ExampleField,
        ' of type TFirst.
        Dim exField As FieldBuilder = _
            myType.DefineField("ExampleField", TFirst, _
                FieldAttributes.Private)

        ' Define a Shared method that takes an array of TFirst and 
        ' returns a List(Of TFirst) containing all the elements of 
        ' the array. To define this method it is necessary to create
        ' the type List(Of TFirst) by calling MakeGenericType on the
        ' generic type definition, List(Of T). (The T is omitted with
        ' the GetType operator when you get the generic type 
        ' definition.) The parameter type is created by using the
        ' MakeArrayType method. 
        '
        Dim listOf As Type = GetType(List(Of ))
        Dim listOfTFirst As Type = listOf.MakeGenericType(TFirst)
        Dim mParamTypes() As Type = { TFirst.MakeArrayType() }

        Dim exMethod As MethodBuilder = _
            myType.DefineMethod("ExampleMethod", _
                MethodAttributes.Public Or MethodAttributes.Static, _
                listOfTFirst, _
                mParamTypes)

        ' Emit the method body. 
        ' The method body consists of just three opcodes, to load 
        ' the input array onto the execution stack, to call the 
        ' List(Of TFirst) constructor that takes IEnumerable(Of TFirst),
        ' which does all the work of putting the input elements into
        ' the list, and to return, leaving the list on the stack. The
        ' hard work is getting the constructor.
        ' 
        ' The GetConstructor method is not supported on a 
        ' GenericTypeParameterBuilder, so it is not possible to get 
        ' the constructor of List(Of TFirst) directly. There are two
        ' steps, first getting the constructor of List(Of T) and then
        ' calling a method that converts it to the corresponding 
        ' constructor of List(Of TFirst).
        '
        ' The constructor needed here is the one that takes an
        ' IEnumerable(Of T). Note, however, that this is not the 
        ' generic type definition of IEnumerable(Of T); instead, the
        ' T from List(Of T) must be substituted for the T of 
        ' IEnumerable(Of T). (This seems confusing only because both
        ' types have type parameters named T. That is why this example
        ' uses the somewhat silly names TFirst and TSecond.) To get
        ' the type of the constructor argument, take the generic
        ' type definition IEnumerable(Of T) (expressed as 
        ' IEnumerable(Of ) when you use the GetType operator) and 
        ' call MakeGenericType with the first generic type parameter
        ' of List(Of T). The constructor argument list must be passed
        ' as an array, with just one argument in this case.
        ' 
        ' Now it is possible to get the constructor of List(Of T),
        ' using GetConstructor on the generic type definition. To get
        ' the constructor of List(Of TFirst), pass List(Of TFirst) and
        ' the constructor from List(Of T) to the static
        ' TypeBuilder.GetConstructor method.
        '
        Dim ilgen As ILGenerator = exMethod.GetILGenerator()
        
        Dim ienumOf As Type = GetType(IEnumerable(Of ))
        Dim listOfTParams() As Type = listOf.GetGenericArguments()
        Dim TfromListOf As Type = listOfTParams(0)
        Dim ienumOfT As Type = ienumOf.MakeGenericType(TfromListOf)
        Dim ctorArgs() As Type = { ienumOfT }

        Dim ctorPrep As ConstructorInfo = _
            listOf.GetConstructor(ctorArgs)
        Dim ctor As ConstructorInfo = _
            TypeBuilder.GetConstructor(listOfTFirst, ctorPrep)

        ilgen.Emit(OpCodes.Ldarg_0)
        ilgen.Emit(OpCodes.Newobj, ctor)
        ilgen.Emit(OpCodes.Ret)

        ' Create the type and save the assembly. 
        Dim finished As Type = myType.CreateType()
        myAssembly.Save(myAsmName.Name & ".dll")

        ' Invoke the method.
        ' ExampleMethod is not generic, but the type it belongs to is
        ' generic, so in order to get a MethodInfo that can be invoked
        ' it is necessary to create a constructed type. The Example 
        ' class satisfies the constraints on TFirst, because it is a 
        ' reference type and has a default constructor. In order to
        ' have a class that satisfies the constraints on TSecond, 
        ' this code example defines the ExampleDerived type. These
        ' two types are passed to MakeGenericMethod to create the
        ' constructed type.
        '
        Dim typeArgs() As Type = _
            { GetType(Example), GetType(ExampleDerived) }
        Dim constructed As Type = finished.MakeGenericType(typeArgs)
        Dim mi As MethodInfo = constructed.GetMethod("ExampleMethod")

        ' Create an array of Example objects, as input to the generic
        ' method. This array must be passed as the only element of an 
        ' array of arguments. The first argument of Invoke is 
        ' Nothing, because ExampleMethod is Shared. Display the count
        ' on the resulting List(Of Example).
        ' 
        Dim input() As Example = { New Example(), New Example() }
        Dim arguments() As Object = { input }

        Dim listX As List(Of Example) = mi.Invoke(Nothing, arguments)

        Console.WriteLine(vbLf & _
            "There are {0} elements in the List(Of Example).", _
            listX.Count _ 
        )

        DisplayGenericParameters(finished)
    End Sub

    Private Shared Sub DisplayGenericParameters(ByVal t As Type)

        If Not t.IsGenericType Then
            Console.WriteLine("Type '{0}' is not generic.")
            Return
        End If
        If Not t.IsGenericTypeDefinition Then _
            t = t.GetGenericTypeDefinition()

        Dim typeParameters() As Type = t.GetGenericArguments()
        Console.WriteLine(vbCrLf & _
            "Listing {0} type parameters for type '{1}'.", _
            typeParameters.Length, t)

        For Each tParam As Type In typeParameters

            Console.WriteLine(vbCrLf & "Type parameter {0}:", _
                tParam.ToString())

            For Each c As Type In tParam.GetGenericParameterConstraints()
                If c.IsInterface Then
                    Console.WriteLine("    Interface constraint: {0}", c)
                Else
                    Console.WriteLine("    Base type constraint: {0}", c)
                End If
            Next 

            ListConstraintAttributes(tParam)
        Next tParam
    End Sub

    ' List the constraint flags. The GenericParameterAttributes
    ' enumeration contains two sets of attributes, variance and
    ' constraints. For this example, only constraints are used.
    '
    Private Shared Sub ListConstraintAttributes(ByVal t As Type)

        ' Mask off the constraint flags. 
        Dim constraints As GenericParameterAttributes = _
            t.GenericParameterAttributes And _
            GenericParameterAttributes.SpecialConstraintMask

        If (constraints And GenericParameterAttributes.ReferenceTypeConstraint) _
                <> GenericParameterAttributes.None Then _
            Console.WriteLine("    ReferenceTypeConstraint")

        If (constraints And GenericParameterAttributes.NotNullableValueTypeConstraint) _
                <> GenericParameterAttributes.None Then _
            Console.WriteLine("    NotNullableValueTypeConstraint")

        If (constraints And GenericParameterAttributes.DefaultConstructorConstraint) _
                <> GenericParameterAttributes.None Then _
            Console.WriteLine("    DefaultConstructorConstraint")

    End Sub 

End Class

' This code example produces the following output:
'
'Type 'Sample' is generic: False
'Type 'Sample' is generic: True
'
'There are 2 elements in the List(Of Example).
'
'Listing 2 type parameters for type 'Sample[TFirst,TSecond]'.
'
'Type parameter TFirst:
'    ReferenceTypeConstraint
'    DefaultConstructorConstraint
'
'Type parameter TSecond:
'    Interface constraint: IExampleA
'    Interface constraint: IExampleB
'    Base type constraint: ExampleBase

Commenti

È possibile ottenere una matrice di GenericTypeParameterBuilder oggetti usando il TypeBuilder.DefineGenericParameters metodo per aggiungere parametri di tipo a un tipo dinamico, rendendolo quindi un tipo generico o usando il MethodBuilder.DefineGenericParameters metodo per aggiungere parametri di tipo a un metodo dinamico.You can get an array of GenericTypeParameterBuilder objects by using the TypeBuilder.DefineGenericParameters method to add type parameters to a dynamic type, thus making it a generic type, or by using the MethodBuilder.DefineGenericParameters method to add type parameters to a dynamic method. Usare gli GenericTypeParameterBuilder oggetti per aggiungere vincoli ai parametri di tipo.Use the GenericTypeParameterBuilder objects to add constraints to the type parameters. I vincoli sono di tre tipi:Constraints are of three kinds:

  • Il vincolo del tipo di base specifica che qualsiasi tipo assegnato al parametro di tipo generico deve derivare da un particolare tipo di base.The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Impostare questo vincolo usando il SetBaseTypeConstraint metodo.Set this constraint by using the SetBaseTypeConstraint method.

  • Un vincolo di interfaccia specifica che qualsiasi tipo assegnato al parametro di tipo generico deve implementare un'interfaccia specifica.An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Impostare i vincoli di interfaccia utilizzando il SetInterfaceConstraints metodo.Set the interface constraints by using the SetInterfaceConstraints method.

  • I vincoli speciali specificano che qualsiasi tipo assegnato al parametro di tipo generico deve avere un costruttore senza parametri, deve essere un tipo riferimento o deve essere un tipo valore.Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Impostare i vincoli speciali per un parametro di tipo usando il SetGenericParameterAttributes metodo.Set the special constraints for a type parameter by using the SetGenericParameterAttributes method.

Non è possibile recuperare vincoli di interfaccia e vincoli speciali usando i GenericTypeParameterBuilder metodi della classe.Interface constraints and special constraints cannot be retrieved using methods of the GenericTypeParameterBuilder class. Dopo aver creato il tipo generico che contiene i parametri di tipo, è possibile usare il Type relativo oggetto per riflettere i vincoli.Once you have created the generic type that contains the type parameters, you can use its Type object to reflect the constraints. Usare il Type.GetGenericArguments metodo per ottenere i parametri di tipo e per ogni parametro di tipo usare Type.GetGenericParameterConstraints il metodo per ottenere il vincolo del tipo di base e i vincoli Type.GenericParameterAttributes di interfaccia e la proprietà per ottenere i vincoli speciali.Use the Type.GetGenericArguments method to get the type parameters, and for each type parameter use the Type.GetGenericParameterConstraints method to get the base type constraint and interface constraints, and the Type.GenericParameterAttributes property to get the special constraints.

Proprietà

Assembly Assembly Assembly Assembly

Ottiene un oggetto Assembly che rappresenta l'assembly dinamico che contiene la definizione di tipo generico a cui appartiene il parametro di tipo corrente.Gets an Assembly object representing the dynamic assembly that contains the generic type definition the current type parameter belongs to.

AssemblyQualifiedName AssemblyQualifiedName AssemblyQualifiedName AssemblyQualifiedName

Ottiene null in tutti i casi.Gets null in all cases.

Attributes Attributes Attributes Attributes
BaseType BaseType BaseType BaseType

Ottiene il vincolo del tipo di base per il parametro di tipo generico corrente.Gets the base type constraint of the current generic type parameter.

ContainsGenericParameters ContainsGenericParameters ContainsGenericParameters ContainsGenericParameters

Ottiene true in tutti i casi.Gets true in all cases.

CustomAttributes CustomAttributes CustomAttributes CustomAttributes

Ottiene una raccolta che contiene gli attributi personalizzati del membro.Gets a collection that contains this member's custom attributes.

(Inherited from MemberInfo)
DeclaringMethod DeclaringMethod DeclaringMethod DeclaringMethod

Ottiene una classe MethodInfo che rappresenta il metodo dichiarante se la classe GenericTypeParameterBuilder corrente rappresenta un parametro di tipo di un metodo generico.Gets a MethodInfo that represents the declaring method, if the current GenericTypeParameterBuilder represents a type parameter of a generic method.

DeclaringType DeclaringType DeclaringType DeclaringType

Ottiene la definizione di tipo generico o la definizione di metodo generico a cui il parametro di tipo generico appartiene.Gets the generic type definition or generic method definition to which the generic type parameter belongs.

FullName FullName FullName FullName

Ottiene null in tutti i casi.Gets null in all cases.

GenericParameterAttributes GenericParameterAttributes GenericParameterAttributes GenericParameterAttributes

Ottiene una combinazione di flag GenericParameterAttributes che descrivono la covariante e i vincoli speciali del parametro di tipo generico corrente.Gets a combination of GenericParameterAttributes flags that describe the covariance and special constraints of the current generic type parameter.

GenericParameterPosition GenericParameterPosition GenericParameterPosition GenericParameterPosition

Ottiene la posizione del parametro di tipo nell'elenco dei parametri di tipo del tipo generico o del metodo generico in cui il parametro è dichiarato.Gets the position of the type parameter in the type parameter list of the generic type or method that declared the parameter.

GenericTypeArguments GenericTypeArguments GenericTypeArguments GenericTypeArguments
GUID GUID GUID GUID

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

HasElementType HasElementType HasElementType HasElementType

Ottiene un valore che indica se l'oggetto Type corrente comprende o si riferisce a un altro tipo, ovvero se l'oggetto Type corrente è una matrice, un puntatore o viene passato per riferimento.Gets a value indicating 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)
IsAbstract IsAbstract IsAbstract IsAbstract

Ottiene un valore che indica se Type è astratto e se deve essere sottoposto a override.Gets a value indicating whether the Type is abstract and must be overridden.

(Inherited from Type)
IsAnsiClass IsAnsiClass IsAnsiClass IsAnsiClass

Ottiene un valore che indica se l'attributo di formato della stringa AnsiClass è selezionato per Type.Gets a value indicating whether the string format attribute AnsiClass is selected for the Type.

(Inherited from Type)
IsArray IsArray IsArray IsArray

Ottiene un valore che indica se il tipo è una matrice.Gets a value that indicates whether the type is an array.

(Inherited from Type)
IsAutoClass IsAutoClass IsAutoClass IsAutoClass

Ottiene un valore che indica se l'attributo di formato della stringa AutoClass è selezionato per Type.Gets a value indicating whether the string format attribute AutoClass is selected for the Type.

(Inherited from Type)
IsAutoLayout IsAutoLayout IsAutoLayout IsAutoLayout

Ottiene un valore che indica se i campi del tipo corrente sono disposti automaticamente dal Common Language Runtime.Gets a value indicating whether the fields of the current type are laid out automatically by the common language runtime.

(Inherited from Type)
IsByRef IsByRef IsByRef IsByRef

Ottiene un valore che indica se l'oggetto Type viene passato per riferimento.Gets a value indicating whether the Type is passed by reference.

(Inherited from Type)
IsByRefLike IsByRefLike IsByRefLike IsByRefLike
IsClass IsClass IsClass IsClass

Ottiene un valore che indica se Type è una classe o un delegato, ovvero se non è un tipo di valore o un'interfaccia.Gets a value indicating whether the Type is a class or a delegate; that is, not a value type or interface.

(Inherited from Type)
IsCollectible IsCollectible IsCollectible IsCollectible

Ottiene un valore che indica se questo oggetto MemberInfo fa parte di un assembly conservato in un AssemblyLoadContext ritirabile.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

Ottiene un valore che indica se Type è un oggetto COM.Gets a value indicating whether the Type is a COM object.

(Inherited from Type)
IsConstructedGenericType IsConstructedGenericType IsConstructedGenericType IsConstructedGenericType

Ottiene un valore che indica se l'oggetto rappresenta un tipo generico costruito.Gets a value that indicates whether this object represents a constructed generic type.

IsContextful IsContextful IsContextful IsContextful

Ottiene un valore che indica se è possibile includere Type in un contesto.Gets a value indicating whether the Type can be hosted in a context.

(Inherited from Type)
IsEnum IsEnum IsEnum IsEnum
IsExplicitLayout IsExplicitLayout IsExplicitLayout IsExplicitLayout

Ottiene un valore che indica se i campi del tipo corrente sono disposti a offset specificati in modo esplicito.Gets a value indicating whether the fields of the current type are laid out at explicitly specified offsets.

(Inherited from Type)
IsGenericMethodParameter IsGenericMethodParameter IsGenericMethodParameter IsGenericMethodParameter Inherited from Type
IsGenericParameter IsGenericParameter IsGenericParameter IsGenericParameter

Ottiene true in tutti i casi.Gets true in all cases.

IsGenericType IsGenericType IsGenericType IsGenericType

Restituisce false in tutti i casi.Returns false in all cases.

IsGenericTypeDefinition IsGenericTypeDefinition IsGenericTypeDefinition IsGenericTypeDefinition

Ottiene false in tutti i casi.Gets false in all cases.

IsGenericTypeParameter IsGenericTypeParameter IsGenericTypeParameter IsGenericTypeParameter Inherited from Type
IsImport IsImport IsImport IsImport

Ottiene un valore che indica se Type dispone di un attributo ComImportAttribute applicato, che ne indica l'importazione da una libreria di tipi COM.Gets a value indicating whether the Type has a ComImportAttribute attribute applied, indicating that it was imported from a COM type library.

(Inherited from Type)
IsInterface IsInterface IsInterface IsInterface

Ottiene un valore che indica se Type è un'interfaccia, ovvero non è una classe né un tipo di valore.Gets a value indicating whether the Type is an interface; that is, not a class or a value type.

(Inherited from Type)
IsLayoutSequential IsLayoutSequential IsLayoutSequential IsLayoutSequential

Ottiene un valore che indica se i campi del tipo corrente sono disposti in sequenza, nell'ordine in cui sono stati definiti o rilasciati ai metadati.Gets a value indicating whether the fields of the current type are laid out sequentially, in the order that they were defined or emitted to the metadata.

(Inherited from Type)
IsMarshalByRef IsMarshalByRef IsMarshalByRef IsMarshalByRef

Ottiene un valore che indica se l'oggetto Type viene sottoposto a marshalling per riferimento.Gets a value indicating whether the Type is marshaled by reference.

(Inherited from Type)
IsNested IsNested IsNested IsNested

Ottiene un valore che indica se l'oggetto Type corrente rappresenta un tipo la cui definizione è annidata all'interno della definizione di un altro tipo.Gets a value indicating whether the current Type object represents a type whose definition is nested inside the definition of another type.

(Inherited from Type)
IsNestedAssembly IsNestedAssembly IsNestedAssembly IsNestedAssembly

Ottiene un valore che indica se Type è annidato e visibile soltanto all'interno dell'assembly.Gets a value indicating whether the Type is nested and visible only within its own assembly.

(Inherited from Type)
IsNestedFamANDAssem IsNestedFamANDAssem IsNestedFamANDAssem IsNestedFamANDAssem

Ottiene un valore che indica se Type è annidato e visibile soltanto alle classi della stessa famiglia e dello stesso assembly.Gets a value indicating whether the Type is nested and visible only to classes that belong to both its own family and its own assembly.

(Inherited from Type)
IsNestedFamily IsNestedFamily IsNestedFamily IsNestedFamily

Ottiene un valore che indica se Type è annidato e visibile solo all'interno della famiglia.Gets a value indicating whether the Type is nested and visible only within its own family.

(Inherited from Type)
IsNestedFamORAssem IsNestedFamORAssem IsNestedFamORAssem IsNestedFamORAssem

Ottiene un valore che indica se Type è annidato e visibile solo alle classi della stessa famiglia o dello stesso assembly.Gets a value indicating whether the Type is nested and visible only to classes that belong to either its own family or to its own assembly.

(Inherited from Type)
IsNestedPrivate IsNestedPrivate IsNestedPrivate IsNestedPrivate

Ottiene un valore che indica se Type è annidato e dichiarato privato.Gets a value indicating whether the Type is nested and declared private.

(Inherited from Type)
IsNestedPublic IsNestedPublic IsNestedPublic IsNestedPublic

Ottiene un valore che indica se una classe è annidata e dichiarata pubblica.Gets a value indicating whether a class is nested and declared public.

(Inherited from Type)
IsNotPublic IsNotPublic IsNotPublic IsNotPublic

Ottiene un valore che indica se l'oggetto Type non è dichiarato pubblico.Gets a value indicating whether the Type is not declared public.

(Inherited from Type)
IsPointer IsPointer IsPointer IsPointer

Ottiene un valore che indica se Type è un puntatore.Gets a value indicating whether the Type is a pointer.

(Inherited from Type)
IsPrimitive IsPrimitive IsPrimitive IsPrimitive

Ottiene un valore che indica se Type è uno dei tipi primitivi.Gets a value indicating whether the Type is one of the primitive types.

(Inherited from Type)
IsPublic IsPublic IsPublic IsPublic

Ottiene un valore che indica se l'oggetto Type è dichiarato pubblico.Gets a value indicating whether the Type is declared public.

(Inherited from Type)
IsSealed IsSealed IsSealed IsSealed

Ottiene un valore che indica se Type è dichiarato sealed.Gets a value indicating whether the Type is declared sealed.

(Inherited from Type)
IsSecurityCritical IsSecurityCritical IsSecurityCritical IsSecurityCritical

Ottiene un valore che indica se il tipo corrente è SecurityCritical o SecuritySafeCritical al livello di attendibilità corrente e può pertanto eseguire operazioni critiche.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

Ottiene un valore che indica se il tipo corrente è SecuritySafeCritical al livello di attendibilità corrente, vale a dire se può eseguire operazioni critiche e se è possibile accedervi tramite codice trasparente.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

Ottiene un valore che indica se il tipo corrente è trasparente al livello di attendibilità corrente e non può quindi eseguire operazioni critiche.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

Ottiene un valore che indica se per il nome del tipo richiede una gestione speciale.Gets a value indicating whether the type has a name that requires special handling.

(Inherited from Type)
IsSZArray IsSZArray IsSZArray IsSZArray
IsTypeDefinition IsTypeDefinition IsTypeDefinition IsTypeDefinition
IsUnicodeClass IsUnicodeClass IsUnicodeClass IsUnicodeClass

Ottiene un valore che indica se l'attributo di formato della stringa UnicodeClass è selezionato per Type.Gets a value indicating whether the string format attribute UnicodeClass is selected for the Type.

(Inherited from Type)
IsValueType IsValueType IsValueType IsValueType

Ottiene un valore che indica se Type è un tipo di valore.Gets a value indicating whether the Type is a value type.

(Inherited from Type)
IsVariableBoundArray IsVariableBoundArray IsVariableBoundArray IsVariableBoundArray
IsVisible IsVisible IsVisible IsVisible

Ottiene un valore che indica se è possibile accedere a Type da codice esterno all'assembly.Gets a value indicating whether the Type can be accessed by code outside the assembly.

(Inherited from Type)
MemberType MemberType MemberType MemberType

Ottiene un valore MemberTypes che indica che questo membro è un tipo o un tipo annidato.Gets a MemberTypes value indicating that this member is a type or a nested type.

(Inherited from Type)
MetadataToken MetadataToken MetadataToken MetadataToken

Ottiene un valore che identifica un elemento di metadati.Gets a value that identifies a metadata element.

(Inherited from MemberInfo)
Module Module Module Module

Ottiene il modulo dinamico che contiene il parametro di tipo generico.Gets the dynamic module that contains the generic type parameter.

Name Name Name Name

Ottiene il nome del parametro di tipo generico.Gets the name of the generic type parameter.

Namespace Namespace Namespace Namespace

Ottiene null in tutti i casi.Gets null in all cases.

ReflectedType ReflectedType ReflectedType ReflectedType

Ottiene l'oggetto Type utilizzato per ottenere la classe GenericTypeParameterBuilder.Gets the Type object that was used to obtain the GenericTypeParameterBuilder.

StructLayoutAttribute StructLayoutAttribute StructLayoutAttribute StructLayoutAttribute

Ottiene una classe StructLayoutAttribute che descrive il layout del tipo corrente.Gets a StructLayoutAttribute that describes the layout of the current type.

(Inherited from Type)
TypeHandle TypeHandle TypeHandle TypeHandle

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

TypeInitializer TypeInitializer TypeInitializer TypeInitializer

Ottiene l'inizializzatore per il tipo.Gets the initializer for the type.

(Inherited from Type)
UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType

Ottiene il parametro di tipo generico corrente.Gets the current generic type parameter.

Metodi

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

Verifica se l'oggetto dato è un'istanza di EventToken ed è uguale all'istanza corrente.Tests whether the given object is an instance of EventToken and is equal to the current instance.

Equals(Type) Equals(Type) Equals(Type) Equals(Type)

Determina se il tipo di sistema sottostante dell'oggetto Type corrente coincide con il tipo di sistema sottostante dell'oggetto Type specificato.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)

Restituisce una matrice di oggetti Type che rappresenta un elenco filtrato di interfacce implementate o ereditate dall'oggetto Type corrente.Returns an array of Type objects representing a filtered list of interfaces implemented or inherited by the current Type.

(Inherited from Type)
FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) FindMembers(MemberTypes, BindingFlags, MemberFilter, Object) FindMembers(MemberTypes, BindingFlags, MemberFilter, Object)

Restituisce una matrice filtrata di oggetti MemberInfo del tipo di membro specificato.Returns a filtered array of MemberInfo objects of the specified member type.

(Inherited from Type)
GetArrayRank() GetArrayRank() GetArrayRank() GetArrayRank()
GetAttributeFlagsImpl() GetAttributeFlagsImpl() GetAttributeFlagsImpl() GetAttributeFlagsImpl()

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà Attributes e ottiene una combinazione bit per bit di valori di enumerazione che indicano gli attributi associati a Type.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[])

Cerca il costruttore i cui parametri corrispondono ai tipi di argomenti e ai modificatori specificati, usando i vincoli di associazione e la convenzione di chiamata specificati.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[])

Cerca un costruttore i cui parametri corrispondono ai tipi e ai modificatori dell'argomento specificato, usando i vincoli di associazione specificati.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[])

Cerca un costruttore di istanza pubblica i cui parametri corrispondono ai tipi nella matrice specificata.Searches for a public instance constructor whose parameters match the types in the specified array.

(Inherited from 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[])

Quando ne viene eseguito l'override in una classe derivata, cerca un costruttore i cui parametri corrispondono ai modificatori e ai tipi di argomento specificati, usando i vincoli di binding e la convenzione di chiamata specificati.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()

Restituisce tutti i costruttori di tipo pubblico definiti per l'oggetto Type corrente.Returns all the public constructors defined for the current Type.

(Inherited from Type)
GetConstructors(BindingFlags) GetConstructors(BindingFlags) GetConstructors(BindingFlags) GetConstructors(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean) GetCustomAttributes(Boolean)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

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

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetCustomAttributesData() GetCustomAttributesData() GetCustomAttributesData() GetCustomAttributesData()

Restituisce un elenco di oggetti CustomAttributeData che rappresentano i dati relativi agli attributi applicati al membro di destinazione.Returns a list of CustomAttributeData objects representing data about the attributes that have been applied to the target member.

(Inherited from MemberInfo)
GetDefaultMembers() GetDefaultMembers() GetDefaultMembers() GetDefaultMembers()

Cerca i membri definiti per l'oggetto Type corrente per cui è impostato il DefaultMemberAttribute.Searches for the members defined for the current Type whose DefaultMemberAttribute is set.

(Inherited from Type)
GetElementType() GetElementType() GetElementType() GetElementType()

Genera un'eccezione NotSupportedException in tutti i casi.Throws a NotSupportedException in all cases.

GetEnumName(Object) GetEnumName(Object) GetEnumName(Object) GetEnumName(Object)

Restituisce il nome della costante avente il valore specificato, per il tipo di enumerazione corrente.Returns the name of the constant that has the specified value, for the current enumeration type.

(Inherited from Type)
GetEnumNames() GetEnumNames() GetEnumNames() GetEnumNames()

Restituisce i nomi dei membri del tipo di enumerazione corrente.Returns the names of the members of the current enumeration type.

(Inherited from Type)
GetEnumUnderlyingType() GetEnumUnderlyingType() GetEnumUnderlyingType() GetEnumUnderlyingType()

Restituisce il tipo sottostante del tipo di enumerazione corrente.Returns the underlying type of the current enumeration type.

(Inherited from Type)
GetEnumValues() GetEnumValues() GetEnumValues() GetEnumValues()

Restituisce una matrice dei valori delle costanti nel tipo di enumerazione corrente.Returns an array of the values of the constants in the current enumeration type.

(Inherited from Type)
GetEvent(String) GetEvent(String) GetEvent(String) GetEvent(String)

Restituisce l'oggetto EventInfo che rappresenta l'evento pubblico specificato.Returns the EventInfo object representing the specified public event.

(Inherited from Type)
GetEvent(String, BindingFlags) GetEvent(String, BindingFlags) GetEvent(String, BindingFlags) GetEvent(String, BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetEvents() GetEvents() GetEvents() GetEvents()

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetEvents(BindingFlags) GetEvents(BindingFlags) GetEvents(BindingFlags) GetEvents(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetField(String) GetField(String) GetField(String) GetField(String)

Cerca il campo pubblico con il nome specificato.Searches for the public field with the specified name.

(Inherited from Type)
GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetFields() GetFields() GetFields() GetFields()

Restituisce tutti i campi pubblici dell'oggetto Type corrente.Returns all the public fields of the current Type.

(Inherited from Type)
GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetGenericArguments() GetGenericArguments() GetGenericArguments() GetGenericArguments()

Non valido per i parametri di tipo generico.Not valid for generic type parameters.

GetGenericParameterConstraints() GetGenericParameterConstraints() GetGenericParameterConstraints() GetGenericParameterConstraints()
GetGenericTypeDefinition() GetGenericTypeDefinition() GetGenericTypeDefinition() GetGenericTypeDefinition()

Non valido per i parametri di tipo generico.Not valid for generic type parameters.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Restituisce un codice hash di valori interi a 32 bit per l'istanza corrente.Returns a 32-bit integer hash code for the current instance.

GetInterface(String) GetInterface(String) GetInterface(String) GetInterface(String)

Cerca l'interfaccia con il nome specificato.Searches for the interface with the specified name.

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

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetInterfaceMap(Type) GetInterfaceMap(Type) GetInterfaceMap(Type) GetInterfaceMap(Type)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetInterfaces() GetInterfaces() GetInterfaces() GetInterfaces()

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetMember(String) GetMember(String) GetMember(String) GetMember(String)

Cerca i membri pubblici con il nome specificato.Searches for the public members with the specified name.

(Inherited from Type)
GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags)

Cerca i membri specificati, usando i vincoli di binding specificati.Searches for the specified members, using the specified binding constraints.

(Inherited from Type)
GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags) GetMember(String, MemberTypes, BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetMembers() GetMembers() GetMembers() GetMembers()

Restituisce tutti i membri pubblici dell'oggetto Type corrente.Returns all the public members of the current Type.

(Inherited from Type)
GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetMethod(String) GetMethod(String) GetMethod(String) GetMethod(String)

Cerca il metodo pubblico con il nome specificato.Searches for the public method with the specified name.

(Inherited from Type)
GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags)

Cerca il metodo specificato, usando i vincoli di binding specificati.Searches for the specified method, using the specified binding constraints.

(Inherited from Type)
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[])

Cerca il metodo specificato i cui parametri corrispondono ai tipi di argomenti e ai modificatori specificati, usando i vincoli di binding e la convenzione di chiamata specificati.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[])

Cerca il metodo specificato i cui parametri corrispondono ai tipi di argomenti e ai modificatori specificati, usando i vincoli di binding specificati.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[])

Cerca il metodo pubblico specificato i cui parametri corrispondono ai tipi di argomenti specificati.Searches for the specified public method whose parameters match the specified argument types.

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

Cerca il metodo pubblico specificato i cui parametri corrispondono ai modificatori e ai tipi di argomenti specificati.Searches for the specified public method whose parameters match the specified argument types and modifiers.

(Inherited from Type)
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[])

Quando ne viene eseguito l'override in una classe derivata, cerca il metodo specificato i cui parametri corrispondono ai modificatori e ai tipi di argomento definiti, usando i vincoli di binding e la convenzione di chiamata specificati.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()

Restituisce tutti i metodi pubblici dell'oggetto Type corrente.Returns all the public methods of the current Type.

(Inherited from Type)
GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetNestedType(String) GetNestedType(String) GetNestedType(String) GetNestedType(String)

Cerca il tipo annidato pubblico con il nome specificato.Searches for the public nested type with the specified name.

(Inherited from Type)
GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags) GetNestedType(String, BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetNestedTypes() GetNestedTypes() GetNestedTypes() GetNestedTypes()

Restituisce i tipi pubblici annidati all'interno dell'oggetto Type corrente.Returns the public types nested in the current Type.

(Inherited from Type)
GetNestedTypes(BindingFlags) GetNestedTypes(BindingFlags) GetNestedTypes(BindingFlags) GetNestedTypes(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetProperties() GetProperties() GetProperties() GetProperties()

Restituisce tutte le proprietà pubbliche dell'oggetto Type corrente.Returns all the public properties of the current Type.

(Inherited from Type)
GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

GetProperty(String) GetProperty(String) GetProperty(String) GetProperty(String)

Cerca la proprietà pubblica con il nome specificato.Searches for the public property with the specified name.

(Inherited from Type)
GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags)

Cerca la proprietà specificata, usando i vincoli di binding specificati.Searches for the specified property, using the specified binding constraints.

(Inherited from Type)
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[])

Cerca la proprietà specificata i cui parametri corrispondono ai tipi di argomenti e ai modificatori specificati, usando i vincoli di binding specificati.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)

Cerca la proprietà pubblica con il nome e il tipo restituito specificati.Searches for the public property with the specified name and return type.

(Inherited from Type)
GetProperty(String, Type, Type[]) GetProperty(String, Type, Type[]) GetProperty(String, Type, Type[]) GetProperty(String, Type, Type[])

Cerca la proprietà pubblica specificata i cui parametri corrispondono ai tipi di argomenti specificati.Searches for the specified public property whose parameters match the specified argument types.

(Inherited from Type)
GetProperty(String, Type, Type[], ParameterModifier[]) GetProperty(String, Type, Type[], ParameterModifier[]) GetProperty(String, Type, Type[], ParameterModifier[]) GetProperty(String, Type, Type[], ParameterModifier[])

Cerca la proprietà pubblica specificata i cui parametri corrispondono ai tipi di argomenti e ai modificatori specificati.Searches for the specified public property whose parameters match the specified argument types and modifiers.

(Inherited from Type)
GetProperty(String, Type[]) GetProperty(String, Type[]) GetProperty(String, Type[]) GetProperty(String, Type[])

Cerca la proprietà pubblica specificata i cui parametri corrispondono ai tipi di argomenti specificati.Searches for the specified public property whose parameters match the specified argument types.

(Inherited from 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[])

Quando viene sottoposto a override in una classe derivata, cerca la proprietà specificata i cui parametri corrispondono ai modificatori e ai tipi di argomenti definiti, usando i vincoli di binding specificati.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()

Ottiene l'oggetto Type corrente.Gets the current Type.

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

Restituisce il codice del tipo sottostante di questa istanza di Type.Returns the underlying type code of this Type instance.

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

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà HasElementType e determina se l'oggetto Type corrente include o contiene riferimenti a un altro tipo, ovvero se l'oggetto Type corrente è costituito da una matrice o da un puntatore o è passato come riferimento.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[])

Chiama il membro specificato, usando i vincoli di associazione specificati e associando l'elenco di argomenti specificato.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)

Chiama il membro specificato, usando i vincoli di binding specificati e associando l'elenco di argomenti specificati e le impostazioni cultura.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[])

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

IsArrayImpl() IsArrayImpl() IsArrayImpl() IsArrayImpl()

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà IsArray e determina se l'oggetto Type è una matrice.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)

Genera un'eccezione NotSupportedException in tutti i casi.Throws a NotSupportedException exception in all cases.

IsAssignableFrom(TypeInfo) IsAssignableFrom(TypeInfo) IsAssignableFrom(TypeInfo) IsAssignableFrom(TypeInfo)

Genera un'eccezione NotSupportedException in tutti i casi.Throws a NotSupportedException exception in all cases.

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

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà IsByRef e determina se l'oggetto Type viene passato per riferimento.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()

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà IsCOMObject e determina se Type è un oggetto 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()

Implementa la proprietà IsContextful e determina se Type può essere contenuto in un contesto.Implements 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)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

IsEnumDefined(Object) IsEnumDefined(Object) IsEnumDefined(Object) IsEnumDefined(Object)

Restituisce un valore che indica se il valore specificato esiste nel tipo di enumerazione corrente.Returns a value that indicates whether the specified value exists in the current enumeration type.

(Inherited from Type)
IsEquivalentTo(Type) IsEquivalentTo(Type) IsEquivalentTo(Type) IsEquivalentTo(Type)

Determina se due tipi COM presentano la stessa identità e sono idonei per l'equivalenza di tipo.Determines whether two COM types have the same identity and are eligible for type equivalence.

(Inherited from Type)
IsInstanceOfType(Object) IsInstanceOfType(Object) IsInstanceOfType(Object) IsInstanceOfType(Object)
IsMarshalByRefImpl() IsMarshalByRefImpl() IsMarshalByRefImpl() IsMarshalByRefImpl()

Implementa la proprietà IsMarshalByRef e determina se l'oggetto Type viene sottoposto a marshalling per riferimento.Implements the IsMarshalByRef property and determines whether the Type is marshaled by reference.

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

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà IsPointer e determina se l'oggetto Type è un puntatore.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()

Quando ne viene eseguito l'override in una classe derivata, implementa la proprietà IsPrimitive e determina se l'oggetto Type corrisponde a uno dei tipi primitivi.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)

Non supportato per i parametri di tipo generico incompleti.Not supported for incomplete generic type parameters.

IsValueTypeImpl() IsValueTypeImpl() IsValueTypeImpl() IsValueTypeImpl()

Implementa la proprietà IsValueType e determina se l'oggetto Type è un tipo di valore, ovvero, non una classe o un'interfaccia.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()

Restituisce il tipo di una matrice unidimensionale il cui tipo di elemento è il parametro di tipo generico.Returns the type of a one-dimensional array whose element type is the generic type parameter.

MakeArrayType(Int32) MakeArrayType(Int32) MakeArrayType(Int32) MakeArrayType(Int32)

Restituisce il tipo di una matrice il cui tipo di elemento è il parametro di tipo generico, con il numero specificato di dimensioni.Returns the type of an array whose element type is the generic type parameter, with the specified number of dimensions.

MakeByRefType() MakeByRefType() MakeByRefType() MakeByRefType()

Restituisce un oggetto Type che rappresenta il parametro di tipo generico corrente quando è passato come parametro di riferimento.Returns a Type object that represents the current generic type parameter when passed as a reference parameter.

MakeGenericType(Type[]) MakeGenericType(Type[]) MakeGenericType(Type[]) MakeGenericType(Type[])

Non valido per i parametri di tipo generico incompleti.Not valid for incomplete generic type parameters.

MakePointerType() MakePointerType() MakePointerType() MakePointerType()

Restituisce un oggetto Type che rappresenta un puntatore al parametro di tipo generico corrente.Returns a Type object that represents a pointer to the current generic type parameter.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object.

(Inherited from Object)
SetBaseTypeConstraint(Type) SetBaseTypeConstraint(Type) SetBaseTypeConstraint(Type) SetBaseTypeConstraint(Type)

Imposta il tipo di base che un tipo deve ereditare per essere sostituito dal parametro di tipo.Sets the base type that a type must inherit in order to be substituted for the type parameter.

SetCustomAttribute(ConstructorInfo, Byte[]) SetCustomAttribute(ConstructorInfo, Byte[]) SetCustomAttribute(ConstructorInfo, Byte[]) SetCustomAttribute(ConstructorInfo, Byte[])

Imposta un attributo personalizzato usando un BLOB di attributi personalizzati specificato.Sets a custom attribute using a specified custom attribute blob.

SetCustomAttribute(CustomAttributeBuilder) SetCustomAttribute(CustomAttributeBuilder) SetCustomAttribute(CustomAttributeBuilder) SetCustomAttribute(CustomAttributeBuilder)

Impostare un attributo personalizzato usando un generatore di attributi personalizzati.Set a custom attribute using a custom attribute builder.

SetGenericParameterAttributes(GenericParameterAttributes) SetGenericParameterAttributes(GenericParameterAttributes) SetGenericParameterAttributes(GenericParameterAttributes) SetGenericParameterAttributes(GenericParameterAttributes)

Imposta le caratteristiche di varianza e i vincoli speciali del parametro generico, ad esempio il vincolo del costruttore senza parametri.Sets the variance characteristics and special constraints of the generic parameter, such as the parameterless constructor constraint.

SetInterfaceConstraints(Type[]) SetInterfaceConstraints(Type[]) SetInterfaceConstraints(Type[]) SetInterfaceConstraints(Type[])

Imposta le interfacce da implementare per un tipo, per consentirne la sostituzione con il parametro di tipo.Sets the interfaces a type must implement in order to be substituted for the type parameter.

ToString() ToString() ToString() ToString()

Restituisce una rappresentazione di stringa del parametro di tipo generico corrente.Returns a string representation of the current generic type parameter.

Implementazioni dell'interfaccia esplicita

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
_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)

Esegue il mapping di un set di nomi a un set corrispondente di ID dispatch.Maps a set of names to a corresponding set of dispatch identifiers.

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

Ottiene un oggetto Type che rappresenta la classe 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)

Recupera le informazioni sul tipo relative a un oggetto che può quindi essere usato per ottenere informazioni sul tipo relative a un'interfaccia.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)

Recupera il numero delle interfacce di informazioni sul tipo fornite da un oggetto (0 o 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)

Fornisce l'accesso a proprietà e metodi esposti da un oggetto.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)

Esegue il mapping di un set di nomi a un set corrispondente di ID dispatch.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)

Recupera le informazioni sul tipo relative a un oggetto che può quindi essere usato per ottenere informazioni sul tipo relative a un'interfaccia.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)

Recupera il numero delle interfacce di informazioni sul tipo fornite da un oggetto (0 o 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)

Fornisce l'accesso a proprietà e metodi esposti da un oggetto.Provides access to properties and methods exposed by an object.

(Inherited from Type)

Metodi di estensione

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

Recupera una attributo personalizzato di un tipo specificato che viene applicato a un membro specificato.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)

Recupera un attributo personalizzato di un tipo specificato che viene applicato a un membro specificato e verifica facoltativamente i predecessori di tale membro.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)

Recupera una attributo personalizzato di un tipo specificato che viene applicato a un membro specificato.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)

Recupera un attributo personalizzato di un tipo specificato che viene applicato a un membro specificato e verifica facoltativamente i predecessori di tale membro.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)

Recupera una raccolta di attributi personalizzati che vengono applicati a un membro specificato.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)

Recupera una raccolta di attributi personalizzati che vengono applicati a un membro specificato e verifica facoltativamente i predecessori di tale membro.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)

Recupera una raccolta di attributi personalizzati di un tipo specificato che vengono applicati a un membro specificato.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)

Recupera una raccolta di attributi personalizzati di un tipo specificato che vengono applicati a un membro specificato e verifica facoltativamente i predecessori di tale membro.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)

Recupera una raccolta di attributi personalizzati di un tipo specificato che vengono applicati a un membro specificato.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)

Recupera una raccolta di attributi personalizzati di un tipo specificato che vengono applicati a un membro specificato e verifica facoltativamente i predecessori di tale membro.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)

Indica se vengono applicati attributi personalizzati del tipo specificato a un membro specificato.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)

Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un membro specificato e, facoltativamente, ai relativi predecessori.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)

Restituisce la rappresentazione TypeInfo del tipo specificato.Returns the TypeInfo representation of the specified type.

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

Ottiene un token di metadati per il membro specificato, se disponibile.Gets a metadata token for the given member, if available.

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

Restituisce un valore che indica se un token di metadati è disponibile per il membro specificato.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)

Recupera un oggetto che rappresenta l’evento specificato.Retrieves an object that represents the specified event.

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

Recupera una raccolta che rappresenta tutti gli eventi definiti in un tipo specificato.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)

Recupera un oggetto che rappresenta un campo specificato.Retrieves an object that represents a specified field.

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

Recupera una raccolta che rappresenta tutti i campi definiti in un tipo specificato.Retrieves a collection that represents all the fields defined on a specified type.

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

Recupera un oggetto che rappresenta un metodo specificato.Retrieves an object that represents a specified method.

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

Recupera una raccolta che rappresenta tutti i metodi definiti in un tipo specificato.Retrieves a collection that represents all methods defined on a specified type.

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

Recupera una raccolta che rappresenta tutte le proprietà definite in un tipo specificato.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)

Recupera un oggetto che rappresenta una proprietà specificata.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)

Si applica a

Vedi anche