SelectedItem.Name Свойство
Определение
Возвращает имя объекта SelectedItem.Gets the name of the SelectedItem object.
public:
property System::String ^ default { System::String ^ get(); };
public:
property Platform::String ^ default { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(0)]
[get: System.Runtime.InteropServices.DispId(0)]
public string this { get; }
[<System.Runtime.InteropServices.DispId(0)>]
[<get: System.Runtime.InteropServices.DispId(0)>]
member this.Name : string
Default Public ReadOnly Property Name As String
Значение свойства
Строка, представляющая имя объекта SelectedItem.A string representing the name of the SelectedItem object.
- Атрибуты
Примеры
public void CodeExample(DTE2 dte)
{
try
{
// Open project and select one or more items in the
// solution explorer before running this example.
SelectedItem selItem;
string msg = "";
if (dte.SelectedItems.Count > 0)
{
selItem = dte.SelectedItems.Item(1);
msg = "The first selected item is " + selItem.Name;
}
MessageBox.Show(msg);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}