Class IEquatableExtensions

Namespace
Wolfgang.Extensions.IEquatable
Assembly
Wolfgang.Extensions.IEquatable.dll

A collection of extension methods for types that implement IEquatable{T}.

public static class IEquatableExtensions
Inheritance
IEquatableExtensions
Inherited Members

Methods

IsInSet<T>(T?, ICollection<T?>)

Determines if the item is in the specified set of items.

public static bool IsInSet<T>(this T? item, ICollection<T?> set)

Parameters

item T

The item to search for.

set ICollection<T>

The set of items to search.

Returns

bool

True if the item is in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

Exceptions

ArgumentNullException

set is null

IsInSet<T>(T?, IEnumerable<T?>)

Determines if the item is in the specified set of items.

public static bool IsInSet<T>(this T? item, IEnumerable<T?> set)

Parameters

item T

The item to search for.

set IEnumerable<T>

The set of items to search.

Returns

bool

True if the item is in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

Exceptions

ArgumentNullException

set is null

IsInSet<T>(T?, T?)

Determines if the item is in the specified set of items.

public static bool IsInSet<T>(this T? item, T? t1)

Parameters

item T

The item to search for.

t1 T

The first item in the set.

Returns

bool

True if the item is in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

IsInSet<T>(T?, T?, T?)

Determines if the item is in the specified set of items.

public static bool IsInSet<T>(this T? item, T? t1, T? t2)

Parameters

item T

The item to search for.

t1 T

The first item in the set.

t2 T

The second item in the set.

Returns

bool

True if the item is in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

IsInSet<T>(T?, T?, T?, T?)

Determines if the item is in the specified set of items.

public static bool IsInSet<T>(this T? item, T? t1, T? t2, T? t3)

Parameters

item T

The item to search for.

t1 T

The first item in the set.

t2 T

The second item in the set.

t3 T

The third item in the set.

Returns

bool

True if the item is in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

IsInSet<T>(T?, params T?[])

Determines if the item is in the specified set of items.

public static bool IsInSet<T>(this T? item, params T?[] set)

Parameters

item T

The item to search for.

set T[]

The set of items to search.

Returns

bool

True if the item is in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

Exceptions

ArgumentNullException

set is null

IsNotInSet<T>(T?, ICollection<T?>)

Determines if the item is not in the specified set of items.

public static bool IsNotInSet<T>(this T? item, ICollection<T?> set)

Parameters

item T

The item to search for.

set ICollection<T>

The set of items to search.

Returns

bool

True if the item is NOT in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

Exceptions

ArgumentNullException

set is null

IsNotInSet<T>(T?, IEnumerable<T?>)

Determines if the item is not in the specified set of items.

public static bool IsNotInSet<T>(this T? item, IEnumerable<T?> set)

Parameters

item T

The item to search for.

set IEnumerable<T>

The set of items to search.

Returns

bool

True if the item is NOT in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

Exceptions

ArgumentNullException

set is null

IsNotInSet<T>(T?, T?)

Determines if the item is not in the specified set of items.

public static bool IsNotInSet<T>(this T? item, T? t1)

Parameters

item T

The item to search for.

t1 T

The first item in the set.

Returns

bool

True if the item is NOT in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

IsNotInSet<T>(T?, T?, T?)

Determines if the item is not in the specified set of items.

public static bool IsNotInSet<T>(this T? item, T? t1, T? t2)

Parameters

item T

The item to search for.

t1 T

The first item in the set.

t2 T

The second item in the set.

Returns

bool

True if the item is NOT in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

IsNotInSet<T>(T?, T?, T?, T?)

Determines if the item is not in the specified set of items.

public static bool IsNotInSet<T>(this T? item, T? t1, T? t2, T? t3)

Parameters

item T

The item to search for.

t1 T

The first item in the set.

t2 T

The second item in the set.

t3 T

The third item in the set.

Returns

bool

True if the item is NOT in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

IsNotInSet<T>(T?, params T?[])

Determines if the item is not in the specified set of items.

public static bool IsNotInSet<T>(this T? item, params T?[] set)

Parameters

item T

The item to search for.

set T[]

The set of items to search.

Returns

bool

True if the item is NOT in the set; otherwise, false.

Type Parameters

T

The type of the items in the set.

Exceptions

ArgumentNullException

set is null

NotEqual<T>(T?, T?)

Determines whether the specified item is not equal to another value.

public static bool NotEqual<T>(this T? item, T? other)

Parameters

item T

The item to compare.

other T

The other item to compare with.

Returns

bool

True if item and other are not equal; otherwise, false.

Type Parameters

T

The type of the items being compared.