# CheckedListBox.CheckedObjectCollection

Namespace: **Wisej.Web**

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

Represents the collection of checked items in the [CheckedListBox](https://docs.wisej.com/api/wisej.web/lists-and-grids/checkedlistbox).

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Count

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IsReadOnly

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Item(index)

[Object](https://docs.microsoft.com/dotnet/api/system.object): Return an item in the checked items collection.

**Throws:**

* [NotSupportedException](https://docs.microsoft.com/dotnet/api/system.notsupportedexception) The object cannot be set.

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Contains(item)

Determines if the specified item is located within the collection.

| Parameter | Type                                                          | Description                                                  |
| --------- | ------------------------------------------------------------- | ------------------------------------------------------------ |
| **item**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) | An object representing the item to locate in the collection. |

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) 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).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetEnumerator()

Returns an enumerator that can be used to iterate through the [CheckedItems](https://docs.wisej.com/api/wisej.web/lists-and-grids/checkedlistbox/..#checkeditems) 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.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IndexOf(item)

Returns an index into the collection of checked items.

| Parameter | Type                                                          | Description                                                                                           |
| --------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **item**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The object whose index you want to retrieve. This object must belong to the checked items collection. |

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