AddIn.Collection Property

Returns the collection containing the AddIn object that supports this property.

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

Syntax

'Declaration
ReadOnly Property Collection As AddIns
'Usage
Dim instance As AddIn 
Dim value As AddIns 

value = instance.Collection
AddIns Collection { get; }
property AddIns^ Collection {
    AddIns^ get ();
}
function get Collection () : AddIns

Property Value

Type: EnvDTE.AddIns
An AddIns collection.

Examples

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 Security

See Also

Reference

AddIn Interface

AddIn Members

EnvDTE Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples