CheckedListBox::GetItemChecked Method (Int32)

 

Returns a value indicating whether the specified item is checked.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
bool GetItemChecked(
	int index
)

Parameters

index
Type: System::Int32

The index of the item.

Return Value

Type: System::Boolean

true if the item is checked; otherwise, false.

Exception Condition
ArgumentException

The index specified is less than zero.

-or-

The index specified is greater than or equal to the count of items in the list.

GetItemChecked returns true if the value of CheckState is Checked or Indeterminate for the item. To determine the specific state the item is in, use the GetItemCheckState method.

.NET Framework
Available since 1.1
Return to top
Show: