AddIn.Name 屬性

取得 AddIn 物件的名稱。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
ReadOnly Property Name As String
string Name { get; }
property String^ Name {
    String^ get ();
}
abstract Name : string
function get Name () : String

屬性值

型別:System.String
代表 AddIn 物件名稱的字串。

範例

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 安全性

請參閱

參考

AddIn 介面

EnvDTE 命名空間

其他資源

HOW TO:編譯和執行 Automation 物件模型程式碼範例