ListBox.GetSelectedIndices Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the array of index values for currently selected items in the ListBox control.
public:
virtual cli::array <int> ^ GetSelectedIndices();
public virtual int[] GetSelectedIndices ();
abstract member GetSelectedIndices : unit -> int[]
override this.GetSelectedIndices : unit -> int[]
Public Overridable Function GetSelectedIndices () As Integer()
Returns
An array of integers, each representing the index of a selected item in the list box.
Remarks
Use the GetSelectedIndices method to identify or access the selected items in the ListBox control. Each element in the returned array represents the index for a selected list item. You can use the index values to access the items in the Items collection.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om