AddIn.Name 属性

获取 AddIn 对象的名称。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
ReadOnly Property Name As String
    Get
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 命名空间

其他资源

如何:编译和运行自动化对象模型代码示例