System.Web.UI.WebControls.ListBox.SelectSingle C# (CSharp) Method

SelectSingle() private method

private SelectSingle ( string values ) : bool
values string
return bool
		bool SelectSingle (string [] values)
		{
			string val = values [0];
			int idx = Items.IndexOf (val);
			int prev_index = SelectedIndex;
			if (idx != prev_index) {
				// This will set both the index value and the item.Selected property
				SelectedIndex = idx;
				return true;
			}
			return false;
		}