System.Windows.Forms.ListBox.SelectedObjectCollection.Add C# (CSharp) Method

Add() public method

public Add ( object value ) : void
value object
return void
			public void Add (object value)
			{
				if (owner.selection_mode == SelectionMode.None)
					throw new ArgumentException ("Cannot call this method if SelectionMode is SelectionMode.None");

				int idx = owner.items.IndexOf (value);
				if (idx == -1)
					return;

				owner.selected_indices.Add (idx);
			}