# CheckedListBox.CheckedIndexCollection

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.5.0.0)

Represents the collection containing the indexes to the selected items in a [CheckedListBox](/api/v3.5/wisej.web/lists-and-grids/checkedlistbox.md).

{% tabs %}
{% tab title="C#" %}

```csharp
public class CheckedIndexCollection : IList, ICollection, IEnumerable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class CheckedIndexCollection
    Inherits IList
    Implements ICollection, IEnumerable
```

{% endtab %}
{% endtabs %}

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u)Count

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the number of selected items.

### ![](/files/hsR4ok3152WyAf8J2C1u)IsReadOnly

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns a value indicating whether this collection can be modified.

### ![](/files/hsR4ok3152WyAf8J2C1u)Item(index)

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the index of a checked item in the [CheckedListBox](/api/v3.5/wisej.web/lists-and-grids/checkedlistbox.md) control.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The *index* is less than zero.-or- The *index* is not in the collection.

## Methods

### ![](/files/hsR4ok3152WyAf8J2C1u)Contains(index)

Determines if the specified index is located within the collection.

| Parameter | Type                                                        | Description                            |
| --------- | ----------------------------------------------------------- | -------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index to locate in the collection. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). true if the index is located within the collection; otherwise, false.

### ![](/files/hsR4ok3152WyAf8J2C1u)CopyTo(array, index)

Copies the entire collection into an existing array at a specified location within the array.

| Parameter | Type                                                        | Description                                                       |
| --------- | ----------------------------------------------------------- | ----------------------------------------------------------------- |
| **array** | [Array](https://docs.microsoft.com/dotnet/api/system.array) | The destination array.                                            |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The zero-based relative index in *array* at which copying begins. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception) *array* is null.
* [RankException](https://docs.microsoft.com/dotnet/api/system.rankexception) *array* is multidimensional.
* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *index* is less than zero.
* [ArgumentException](https://docs.microsoft.com/dotnet/api/system.argumentexception) The number of elements in the source [Array](https://docs.microsoft.com/dotnet/api/system.array) is greater than the available space from index to the end of the destination [Array](https://docs.microsoft.com/dotnet/api/system.array).
* [ArrayTypeMismatchException](https://docs.microsoft.com/dotnet/api/system.arraytypemismatchexception) The type of the source [Array](https://docs.microsoft.com/dotnet/api/system.array) cannot be cast automatically to the type of the destination [Array](https://docs.microsoft.com/dotnet/api/system.array).

### ![](/files/hsR4ok3152WyAf8J2C1u)GetEnumerator()

Returns an enumerator that can be used to iterate through the [CheckedIndices](/api/v3.5/wisej.web/lists-and-grids/checkedlistbox.md#checkedindices) collection.

**Returns:** [IEnumerator](https://docs.microsoft.com/dotnet/api/system.collections.ienumerator). An [IEnumerator](https://docs.microsoft.com/dotnet/api/system.collections.ienumerator) for navigating through the list.

### ![](/files/hsR4ok3152WyAf8J2C1u)IndexOf(index)

Returns an index into the collection of checked indexes.

| Parameter | Type                                                        | Description                    |
| --------- | ----------------------------------------------------------- | ------------------------------ |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index of the checked item. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The index that specifies the index of the checked item or -1 if the *index* parameter is not in the checked indexes collection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/v3.5/wisej.web/lists-and-grids/checkedlistbox/wisej.web.checkedlistbox.checkedindexcollection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
