Freigeben über


AddIn.Collection-Eigenschaft

Gibt die Auflistung mit dem AddIn-Objekt zurück, das diese Eigenschaft unterstützt.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
ReadOnly Property Collection As AddIns
AddIns Collection { get; }
property AddIns^ Collection {
    AddIns^ get ();
}
abstract Collection : AddIns
function get Collection () : AddIns

Eigenschaftswert

Typ: EnvDTE.AddIns
Eine AddIns-Auflistung.

Beispiele

public void AddinCollExample(AddIn addIn)
{
   // For this example to work, there should be an add-in
   // available in the Visual Studio enviroment.
   
   string peers = "";
   
   // Retrieve all peer elements of the addin
   foreach (AddIn someAddin in addIn.Collection)
   {
      if ((someAddin != addIn) && (someAddin.Name != null))
         peers += someAddin.Name + "\n";
   }
   MessageBox.Show(addIn.Name + " has the following peer elements:\n\n" + peers);
}

.NET Framework-Sicherheit

Siehe auch

Referenz

AddIn Schnittstelle

EnvDTE-Namespace

Weitere Ressourcen

Gewusst wie: Kompilieren und Ausführen der Codebeispiele für das Automatisierungsobjektmodell