# DomainUpDown.DomainUpDownItemCollection

Namespace: **Wisej.Web**

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

Encapsulates a collection of objects for use by the [DomainUpDown](https://docs.wisej.com/api/v3.2/wisej.web/editors/domainupdown) class.

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

## Properties

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Count

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

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)IsReadOnly

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

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Item(index)

[Object](https://docs.microsoft.com/dotnet/api/system.object): Retrieves the item at the specified index within the collection.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The index was less than zero; or the index was greater of equal to the count of items in the collection.

## Methods

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Add(item)

Adds an object to the end of the collection.

| Parameter | Type                                                          | Description                                                                                                                        |
| --------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **item**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The [Object](https://docs.microsoft.com/dotnet/api/system.object) to be added to the end of the collection. The value can be null. |

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The index at which the *item* has been added.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)AddRange(items)

Adds a collection of objects to the end of the collection.

| Parameter | Type                                                              | Description                                |
| --------- | ----------------------------------------------------------------- | ------------------------------------------ |
| **items** | [Object\[\]](https://docs.microsoft.com/dotnet/api/system.object) | Items to add to the end of the collection. |

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Clear()

Removes all items from the [DomainUpDown](https://docs.wisej.com/api/v3.2/wisej.web/editors/domainupdown) control.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)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://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)GetEnumerator()

Returns an enumerator that can be used to iterate through the item collection.

**Returns:** [IEnumerator](https://docs.microsoft.com/dotnet/api/system.collections.ienumerator). A [IEnumerator](https://docs.microsoft.com/dotnet/api/system.collections.ienumerator) that represents the item collection.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)IndexOf(item)

Retrieves the index within the collection of the specified item.

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

**Returns:** [Int32](https://docs.microsoft.com/dotnet/api/system.int32). The zero-based index where the item is located within the collection; otherwise, -1.

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception) The *item* parameter was null.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Insert(index, item)

Inserts an element into the collection at the specified index.

| Parameter | Type                                                          | Description                                                                                         |
| --------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The zero-based index at which *item* should be inserted.                                            |
| **item**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The [Object](https://docs.microsoft.com/dotnet/api/system.object) to insert. The value can be null. |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *index* is less than zero, or *index* is greater than number of items in the collection.

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)Remove(item)

Removes the first occurrence of a specific object from the collection.

| Parameter | Type                                                          | Description                                                                                                             |
| --------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **item**  | [Object](https://docs.microsoft.com/dotnet/api/system.object) | The [Object](https://docs.microsoft.com/dotnet/api/system.object) to remove from the collection. The value can be null. |

### ![](https://3811934619-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaN9qL9rX9v301dsI6CfD%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=bc63f9cf-3241-48ac-8cb4-46d1df1d13df)RemoveAt(index)

Removes the element at the specified index of the collection.

| Parameter | Type                                                        | Description                                    |
| --------- | ----------------------------------------------------------- | ---------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The zero-based index of the element to remove. |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) *index* is less than zero; or *index* is equal to or greater than number of items in the collection.
