Export (0) Print
Expand All

AddIn.Object Property

Sets or gets the object supporting the specified AddIn object.

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

function get Object () : Object 
function set Object (value : Object)

Property Value

Type: System.Object
  • An additional OLE automation object to support other add-ins.

public void AddinObjExample(AddIn addIn)
{ 
   try
   {
      // If the Add-in's namespace is AnAddin and the constructor
      // is Connect(an object for implementing an Addin),
      // someObject is an instance of AnAddin.Connect.
      Object someObject = addIn.Object;

      MessageBox.Show(someObject.GetType().ToString());
   }
   catch(Exception ex)
   { 
      MessageBox.Show(ex.Message);
   }
}

Show:
© 2014 Microsoft