ContextAttributes.Count Property
Visual Studio 2012
Gets a value indicating the number of objects in the ContextAttributes collection.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Property Value
Type: System.Int32An integer value indicating the number of objects in the ContextAttributes collection.
public void CountExample(DTE2 dte) { // Display all add-ins. AddIn addIn; string msg = ""; for (int i = 1; i <= dte.AddIns.Count; ++i) { addIn = dte.AddIns.Item(i); msg += " " + addIn.Name; if (addIn.Connected) msg += " (Loaded)\n"; else msg += " (Not Loaded)\n"; } MessageBox.Show("Available add-ins:\n\n" + msg); }
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.