# ExceptWith

> Removes the values from this set which are also present in another collection.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## ExceptWith\<T>(NativeHashSet\<T>, FixedList128Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, FixedList128Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[FixedList128Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist128bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, FixedList32Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, FixedList32Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[FixedList32Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist32bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, FixedList4096Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, FixedList4096Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[FixedList4096Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist4096bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, FixedList512Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, FixedList512Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[FixedList512Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist512bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, FixedList64Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, FixedList64Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[FixedList64Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist64bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, NativeArray\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, NativeArray<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[NativeArray\<T>]\(/engine/6000.7/script-reference/unity/collections/nativearray1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, NativeHashSet\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, NativeHashSet<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, ReadOnly)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, NativeHashSet<T>.ReadOnly other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[ReadOnly]\(/engine/6000.7/script-reference/unity/collections/nativehashset1/readonly)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, NativeParallelHashSet\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, NativeParallelHashSet<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, ReadOnly)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, NativeParallelHashSet<T>.ReadOnly other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[ReadOnly]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1/readonly)): The collection to compare with.

## ExceptWith\<T>(NativeHashSet\<T>, NativeList\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeHashSet<T> container, NativeList<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The set to remove values from.**** (\[NativeList\<T>]\(/engine/6000.7/script-reference/unity/collections/nativelist1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, FixedList128Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, FixedList128Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[FixedList128Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist128bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, FixedList32Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, FixedList32Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[FixedList32Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist32bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, FixedList4096Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, FixedList4096Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[FixedList4096Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist4096bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, FixedList512Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, FixedList512Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[FixedList512Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist512bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, FixedList64Bytes\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, FixedList64Bytes<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[FixedList64Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist64bytes1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, NativeArray\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, NativeArray<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[NativeArray\<T>]\(/engine/6000.7/script-reference/unity/collections/nativearray1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, NativeHashSet\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, NativeHashSet<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[NativeHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativehashset1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, ReadOnly)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, NativeHashSet<T>.ReadOnly other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[ReadOnly]\(/engine/6000.7/script-reference/unity/collections/nativehashset1/readonly)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, NativeParallelHashSet\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, NativeParallelHashSet<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, ReadOnly)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, NativeParallelHashSet<T>.ReadOnly other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[ReadOnly]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1/readonly)): The collection to compare with.

## ExceptWith\<T>(NativeParallelHashSet\<T>, NativeList\<T>)

Removes the values from this set which are also present in another collection.

```csharp
public static void ExceptWith<T>(this ref NativeParallelHashSet<T> container, NativeList<T> other) where T : unmanaged, IEquatable<T>
```

### Parameters

**** (\[NativeParallelHashSet\<T>]\(/engine/6000.7/script-reference/unity/collections/nativeparallelhashset1)): The set to remove values from.**** (\[NativeList\<T>]\(/engine/6000.7/script-reference/unity/collections/nativelist1)): The collection to compare with.
