TypeBuilder.DefineNestedType Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Definisce un tipo annidato.
Overload
| Nome | Descrizione |
|---|---|
| DefineNestedType(String, TypeAttributes, Type, PackingSize, Int32) |
Definisce un tipo annidato, in base al nome, agli attributi, alle dimensioni e al tipo esteso. |
| DefineNestedType(String, TypeAttributes, Type, Type[]) |
Definisce un tipo annidato, in base al nome, agli attributi, al tipo esteso e alle interfacce implementate. |
| DefineNestedType(String, TypeAttributes, Type, Int32) |
Definisce un tipo annidato, in base al nome, agli attributi, alla dimensione totale del tipo e al tipo esteso. |
| DefineNestedType(String, TypeAttributes, Type, PackingSize) |
Definisce un tipo annidato, in base al nome, agli attributi, al tipo esteso e alle dimensioni di compressione. |
| DefineNestedType(String, TypeAttributes) |
Definisce un tipo annidato, in base al nome e agli attributi. |
| DefineNestedType(String) |
Definisce un tipo annidato, dato il nome. |
| DefineNestedType(String, TypeAttributes, Type) |
Definisce un tipo annidato, in base al nome, agli attributi e al tipo esteso. |
DefineNestedType(String, TypeAttributes, Type, PackingSize, Int32)
Definisce un tipo annidato, in base al nome, agli attributi, alle dimensioni e al tipo esteso.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name, System::Reflection::TypeAttributes attr, Type ^ parent, System::Reflection::Emit::PackingSize packSize, int typeSize);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, Type parent, System.Reflection.Emit.PackingSize packSize, int typeSize);
member this.DefineNestedType : string * System.Reflection.TypeAttributes * Type * System.Reflection.Emit.PackingSize * int -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String, attr As TypeAttributes, parent As Type, packSize As PackingSize, typeSize As Integer) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
- attr
- TypeAttributes
Attributi del tipo.
- parent
- Type
Tipo esteso dal tipo annidato.
- packSize
- PackingSize
Dimensione di compressione del tipo.
- typeSize
- Int32
Dimensione totale del tipo.
Valori restituiti
Tipo annidato definito.
Si applica a
DefineNestedType(String, TypeAttributes, Type, Type[])
Definisce un tipo annidato, in base al nome, agli attributi, al tipo esteso e alle interfacce implementate.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name, System::Reflection::TypeAttributes attr, Type ^ parent, cli::array <Type ^> ^ interfaces);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, Type parent, Type[] interfaces);
[System.Runtime.InteropServices.ComVisible(true)]
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, Type parent, Type[] interfaces);
member this.DefineNestedType : string * System.Reflection.TypeAttributes * Type * Type[] -> System.Reflection.Emit.TypeBuilder
[<System.Runtime.InteropServices.ComVisible(true)>]
member this.DefineNestedType : string * System.Reflection.TypeAttributes * Type * Type[] -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String, attr As TypeAttributes, parent As Type, interfaces As Type()) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
- attr
- TypeAttributes
Attributi del tipo.
- parent
- Type
Tipo esteso dal tipo annidato.
- interfaces
- Type[]
Interfacce implementate dal tipo annidato.
Valori restituiti
Tipo annidato definito.
- Attributi
Eccezioni
L'attributo annidato non è specificato.
oppure
Questo tipo è sealed.
oppure
Questo tipo è una matrice.
oppure
Questo tipo è un'interfaccia, ma il tipo annidato non è un'interfaccia.
oppure
La lunghezza di name è zero o maggiore di 1023.
oppure
Questa operazione crea un tipo con un duplicato FullName nell'assembly corrente.
Commenti
Questo metodo può essere usato per creare tipi annidati anche dopo che il CreateType metodo è stato chiamato sul tipo di inclusione.
Il tipo annidato deve essere completato prima di poter riflettere su di esso usando GetMembers, GetNestedTypeo GetNestedTypes.
Vedere la descrizione di CreateType per l'ordine in cui devono essere completati i tipi annidati e i tipi di annidamento.
Un nome duplicato non viene necessariamente creato se name è identico al nome di un tipo definito in precedenza o di un tipo annidato. Per essere duplicati, i nomi completi devono essere gli stessi, inclusi lo spazio dei nomi e tutti i tipi di annidamento.
Si applica a
DefineNestedType(String, TypeAttributes, Type, Int32)
Definisce un tipo annidato, in base al nome, agli attributi, alla dimensione totale del tipo e al tipo esteso.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name, System::Reflection::TypeAttributes attr, Type ^ parent, int typeSize);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, Type parent, int typeSize);
member this.DefineNestedType : string * System.Reflection.TypeAttributes * Type * int -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String, attr As TypeAttributes, parent As Type, typeSize As Integer) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
- attr
- TypeAttributes
Attributi del tipo.
- parent
- Type
Tipo esteso dal tipo annidato.
- typeSize
- Int32
Dimensione totale del tipo.
Valori restituiti
Tipo annidato definito.
Eccezioni
L'attributo annidato non è specificato.
oppure
Questo tipo è sealed.
oppure
Questo tipo è una matrice.
oppure
Questo tipo è un'interfaccia, ma il tipo annidato non è un'interfaccia.
oppure
La lunghezza di name è zero o maggiore di 1023.
oppure
Questa operazione crea un tipo con un duplicato FullName nell'assembly corrente.
name è null.
Commenti
Questo metodo può essere usato per creare tipi annidati anche dopo che il CreateType metodo è stato chiamato sul tipo di inclusione.
Il tipo annidato deve essere completato prima di poter riflettere su di esso usando GetMembers, GetNestedTypeo GetNestedTypes.
Vedere la descrizione di CreateType per l'ordine in cui devono essere completati i tipi annidati e i tipi di annidamento.
Un nome duplicato non viene necessariamente creato se name è identico al nome di un tipo definito in precedenza o di un tipo annidato. Per essere duplicati, i nomi completi devono essere gli stessi, inclusi lo spazio dei nomi e tutti i tipi di annidamento.
Si applica a
DefineNestedType(String, TypeAttributes, Type, PackingSize)
Definisce un tipo annidato, in base al nome, agli attributi, al tipo esteso e alle dimensioni di compressione.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name, System::Reflection::TypeAttributes attr, Type ^ parent, System::Reflection::Emit::PackingSize packSize);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, Type parent, System.Reflection.Emit.PackingSize packSize);
member this.DefineNestedType : string * System.Reflection.TypeAttributes * Type * System.Reflection.Emit.PackingSize -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String, attr As TypeAttributes, parent As Type, packSize As PackingSize) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
- attr
- TypeAttributes
Attributi del tipo.
- parent
- Type
Tipo esteso dal tipo annidato.
- packSize
- PackingSize
Dimensione di compressione del tipo.
Valori restituiti
Tipo annidato definito.
Eccezioni
L'attributo annidato non è specificato.
oppure
Questo tipo è sealed.
oppure
Questo tipo è una matrice.
oppure
Questo tipo è un'interfaccia, ma il tipo annidato non è un'interfaccia.
oppure
La lunghezza di name è zero o maggiore di 1023.
oppure
Questa operazione crea un tipo con un duplicato FullName nell'assembly corrente.
name è null.
Commenti
Questo metodo può essere usato per creare tipi annidati anche dopo che il CreateType metodo è stato chiamato sul tipo di inclusione.
Il tipo annidato deve essere completato prima di poter riflettere su di esso usando GetMembers, GetNestedTypeo GetNestedTypes.
Vedere la descrizione di CreateType per l'ordine in cui devono essere completati i tipi annidati e i tipi di annidamento.
Un nome duplicato non viene necessariamente creato se name è identico al nome di un tipo definito in precedenza o di un tipo annidato. Per essere duplicati, i nomi completi devono essere gli stessi, inclusi lo spazio dei nomi e tutti i tipi di annidamento.
Si applica a
DefineNestedType(String, TypeAttributes)
Definisce un tipo annidato, in base al nome e agli attributi.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name, System::Reflection::TypeAttributes attr);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr);
member this.DefineNestedType : string * System.Reflection.TypeAttributes -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String, attr As TypeAttributes) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
- attr
- TypeAttributes
Attributi del tipo.
Valori restituiti
Tipo annidato definito.
Eccezioni
L'attributo annidato non è specificato.
oppure
Questo tipo è sealed.
oppure
Questo tipo è una matrice.
oppure
Questo tipo è un'interfaccia, ma il tipo annidato non è un'interfaccia.
oppure
La lunghezza di name è zero o maggiore di 1023.
oppure
Questa operazione crea un tipo con un duplicato FullName nell'assembly corrente.
name è null.
Commenti
Questo metodo può essere usato per creare tipi annidati anche dopo che il CreateType metodo è stato chiamato sul tipo di inclusione.
Il tipo annidato deve essere completato prima di poter riflettere su di esso usando GetMembers, GetNestedTypeo GetNestedTypes.
Vedere la descrizione di CreateType per l'ordine in cui devono essere completati i tipi annidati e i tipi di annidamento.
Un nome duplicato non viene necessariamente creato se name è identico al nome di un tipo definito in precedenza o di un tipo annidato. Per essere duplicati, i nomi completi devono essere gli stessi, inclusi lo spazio dei nomi e tutti i tipi di annidamento.
Si applica a
DefineNestedType(String)
Definisce un tipo annidato, dato il nome.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name);
member this.DefineNestedType : string -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
Valori restituiti
Tipo annidato definito.
Eccezioni
La lunghezza di name è zero o maggiore di 1023.
oppure
Questa operazione crea un tipo con un duplicato FullName nell'assembly corrente.
name è null.
Commenti
Questo metodo può essere usato per creare tipi annidati anche dopo che il CreateType metodo è stato chiamato sul tipo di inclusione.
Il tipo annidato deve essere completato prima di poter riflettere su di esso usando GetMembers, GetNestedTypeo GetNestedTypes.
Vedere la descrizione di CreateType per l'ordine in cui devono essere completati i tipi annidati e i tipi di annidamento.
Un nome duplicato non viene necessariamente creato se name è identico al nome di un tipo definito in precedenza o di un tipo annidato. Per essere duplicati, i nomi completi devono essere gli stessi, inclusi lo spazio dei nomi e tutti i tipi di annidamento.
Si applica a
DefineNestedType(String, TypeAttributes, Type)
Definisce un tipo annidato, in base al nome, agli attributi e al tipo esteso.
public:
System::Reflection::Emit::TypeBuilder ^ DefineNestedType(System::String ^ name, System::Reflection::TypeAttributes attr, Type ^ parent);
public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, Type parent);
member this.DefineNestedType : string * System.Reflection.TypeAttributes * Type -> System.Reflection.Emit.TypeBuilder
Public Function DefineNestedType (name As String, attr As TypeAttributes, parent As Type) As TypeBuilder
Parametri
- name
- String
Nome breve del tipo.
name non può contenere valori Null incorporati.
- attr
- TypeAttributes
Attributi del tipo.
- parent
- Type
Tipo esteso dal tipo annidato.
Valori restituiti
Tipo annidato definito.
Eccezioni
L'attributo annidato non è specificato.
oppure
Questo tipo è sealed.
oppure
Questo tipo è una matrice.
oppure
Questo tipo è un'interfaccia, ma il tipo annidato non è un'interfaccia.
oppure
La lunghezza di name è zero o maggiore di 1023.
oppure
Questa operazione crea un tipo con un duplicato FullName nell'assembly corrente.
name è null.
Commenti
Questo metodo può essere usato per creare tipi annidati anche dopo che il CreateType metodo è stato chiamato sul tipo di inclusione.
Il tipo annidato deve essere completato prima di poter riflettere su di esso usando GetMembers, GetNestedTypeo GetNestedTypes.
Vedere la descrizione di CreateType per l'ordine in cui devono essere completati i tipi annidati e i tipi di annidamento.
Un nome duplicato non viene necessariamente creato se name è identico al nome di un tipo definito in precedenza o di un tipo annidato. Per essere duplicati, i nomi completi devono essere gli stessi, inclusi lo spazio dei nomi e tutti i tipi di annidamento.