> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class InheritableHashSet<T>

Namespace: [VM.Collections](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Collections)\
Assembly: VM.dll

```csharp theme={null}
public abstract class InheritableHashSet<T> : HashSet<T>
```

#### Type Parameters

`T`

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[HashSet\<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.hashset-1) ←
[InheritableHashSet\<T>](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Collections.InheritableHashSet-1.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### InheritableHashSet()

```csharp theme={null}
public InheritableHashSet()
```

### InheritableHashSet(IEnumerable\<T>)

```csharp theme={null}
public InheritableHashSet(IEnumerable<T> collection)
```

#### Parameters

`collection` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<T>

### InheritableHashSet(IEqualityComparer\<T>)

```csharp theme={null}
public InheritableHashSet(IEqualityComparer<T> comparer)
```

#### Parameters

`comparer` [IEqualityComparer](https://learn.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1)\<T>

### InheritableHashSet(IEnumerable\<T>, IEqualityComparer\<T>)

```csharp theme={null}
public InheritableHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
```

#### Parameters

`collection` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<T>

`comparer` [IEqualityComparer](https://learn.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1)\<T>

### InheritableHashSet(SerializationInfo, StreamingContext)

```csharp theme={null}
protected InheritableHashSet(SerializationInfo serializationInfo, StreamingContext streamingContext)
```

#### Parameters

`serializationInfo` [SerializationInfo](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo)

`streamingContext` [StreamingContext](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.streamingcontext)

## Methods

### Add(T)

```csharp theme={null}
public bool Add(T item)
```

#### Parameters

`item` T

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### AddItem(T)

```csharp theme={null}
protected virtual bool AddItem(T item)
```

#### Parameters

`item` T

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Clear()

```csharp theme={null}
public void Clear()
```

### ClearItems()

```csharp theme={null}
protected virtual void ClearItems()
```

### Remove(T)

```csharp theme={null}
public bool Remove(T item)
```

#### Parameters

`item` T

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### RemoveItem(T)

```csharp theme={null}
protected virtual bool RemoveItem(T item)
```

#### Parameters

`item` T

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)
