Export (0) Print
Expand All
ID
Top
Expand Minimize

SelectedItems Property (DTE Object)

Visual Studio .NET 2003

Returns a collection containing the items currently selected in the environment.

[Visual Basic .NET]
Public ReadOnly Property SelectedItems() As SelectedItems
[Visual Basic 6]
Property Get SelectedItems() As SelectedItems
[C++]
HRESULT __stdcall get_SelectedItems(
   /* [out, retval] */ SelectedItems** retVal
);
[C#]
SelectedItems SelectedItems {get;}
[JScript .NET]
public function get SelectedItems() : SelectedItems

Return Value

Returns a SelectedItems collection.

Example

Sub SelectedItemsExample()
   ' Select some items in Solution Explorer before running.
   Dim iCtr As Integer
   Dim msg As String

   ' List the names of the selected items.
   For iCtr = 1 To DTE.SelectedItems.Count
      msg = msg & "Item name: " & DTE.SelectedItems.Item(iCtr).Name & vbCr
   Next
   MsgBox(msg)
End Sub

See Also

SelectedItems Collection | SelectedItem Object

Applies To: DTE Object

Show:
© 2014 Microsoft