# Class ResourceNameList&lt;TName&gt; (4.10.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [4.10.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1)
- [4.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.ResourceNameList-1)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.ResourceNameList-1)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.ResourceNameList-1)
- [4.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.ResourceNameList-1)
- [4.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.ResourceNameList-1)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.ResourceNameList-1)

    public sealed class ResourceNameList<TName> : IList<TName>, ICollection<TName>, IEnumerable<TName>, IEnumerable where TName : class, IResourceName

A list of resource names of a specific type, that delegates all operations to an
underlying list of string-based resource names.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ResourceNameList\<TName\>

## Implements

[IList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1), [ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax)

## Assembly

Google.Api.Gax.dll

| ## Type Parameter ||
|---|---|
| **Name** | **Description** |
| `TName` | The type of the resource name contained in this list. |

## Constructors

### ResourceNameList(IList\<string\>, Func\<string, TName\>)

    public ResourceNameList(IList<string> underlyingList, Func<string, TName> stringToName)

Constructs a [ResourceNameList\<TName\>](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNameList-1) from an underlying string-based list
and a resource name parser.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `underlyingList` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1https://learn.microsoft.com/dotnet/api/system.string` |
| `stringToName` | `https://learn.microsoft.com/dotnet/api/system.func-2https://learn.microsoft.com/dotnet/api/system.string` |

## Properties

### Count

    public int Count { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### IsReadOnly

    public bool IsReadOnly { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### this\[int\]

    public TName this[int index] { get; set; }

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://learn.microsoft.com/dotnet/api/system.int32` |

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `TName` |   |

## Methods

### Add(IEnumerable\<TName\>)

    public void Add(IEnumerable<TName> items)

Adds all items to this list.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `items` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1` The items to add to this list. |

### Add(TName)

    public void Add(TName item)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `item` | `TName` |

### Clear()

    public void Clear()

### Contains(TName)

    public bool Contains(TName item)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `item` | `TName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CopyTo(TName\[\], int)

    public void CopyTo(TName[] array, int arrayIndex)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `array` |   |
| `arrayIndex` | `https://learn.microsoft.com/dotnet/api/system.int32` |

### GetEnumerator()

    public IEnumerator<TName> GetEnumerator()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1` |   |

### IndexOf(TName)

    public int IndexOf(TName item)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `item` | `TName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### Insert(int, TName)

    public void Insert(int index, TName item)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://learn.microsoft.com/dotnet/api/system.int32` |
| `item` | `TName` |

### Remove(TName)

    public bool Remove(TName item)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `item` | `TName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### RemoveAt(int)

    public void RemoveAt(int index)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://learn.microsoft.com/dotnet/api/system.int32` |