This documentation is archived and is not being maintained.

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
HRESULT __stdcall get_SelectedItems(
   /* [out, retval] */ SelectedItems** retVal
SelectedItems SelectedItems {get;}
[JScript .NET]
public function get SelectedItems() : SelectedItems

Return Value

Returns a SelectedItems collection.


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
End Sub

See Also

SelectedItems Collection | SelectedItem Object

Applies To: DTE Object