SelectedItems.MultiSelect Property


Gets whether or not the current selection includes multiple items.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

bool MultiSelect { get; }

Property Value

Type: System.Boolean

A Boolean value indicating True if the selection contains multiple items, False if not.

Sub MultiSelectExample()
   Dim SelItems As SelectedItems

   SelItems = DTE.SelectedItems
   ' List the number of items selected.
   If SelItems.MultiSelect = True Then
      MsgBox("You have " & SelItems.Count & " items selected in Solution Explorer.")
   End If
End Sub
Return to top