Metodo VirtualTypeBuilder.MethodInfoCollection.Add (String, Type, array<Type[], array<Attribute )

Aggiunge MethodInfo della raccolta.

Spazio dei nomi:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Sintassi

'Dichiarazione
Public Function Add ( _
    name As String, _
    returnType As Type, _
    parameterTypes As Type(), _
    attributes As Attribute() _
) As Integer
public int Add(
    string name,
    Type returnType,
    Type[] parameterTypes,
    Attribute[] attributes
)

Parametri

  • returnType
    Tipo: System.Type
    Il tipo restituito del metodo.Deve trattarsi typeof(void) per i tipi restituiti void.

Valore restituito

Tipo: System.Int32
L'indice il cui valore è stato aggiunto.

Eccezioni

Eccezione Condizione
ArgumentNullException

name viene nullriferimento null (Nothing in Visual Basic).

- oppure-

returnType è nullriferimento null (Nothing in Visual Basic).

- oppure-

un elemento in paramTypes è nullriferimento null (Nothing in Visual Basic).

- oppure-

un elemento in attributes è nullriferimento null (Nothing in Visual Basic).

attributese le proprietà diparamTypes possono essere nullriferimento null (Nothing in Visual Basic).

ArgumentException

handlerType non è un tipo di runtime.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VirtualTypeBuilder.MethodInfoCollection Classe

Overload Add

Spazio dei nomi Microsoft.VisualStudio.Shell.Design