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
itemTThe item to search for.
setICollection<T>The set of items to search.
Returns
- bool
True if the item is in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
setIEnumerable<T>The set of items to search.
Returns
- bool
True if the item is in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
t1TThe first item in the set.
Returns
- bool
True if the item is in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
t1TThe first item in the set.
t2TThe second item in the set.
Returns
- bool
True if the item is in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
t1TThe first item in the set.
t2TThe second item in the set.
t3TThe third item in the set.
Returns
- bool
True if the item is in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
setT[]The set of items to search.
Returns
- bool
True if the item is in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
setICollection<T>The set of items to search.
Returns
- bool
True if the item is NOT in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
setIEnumerable<T>The set of items to search.
Returns
- bool
True if the item is NOT in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
t1TThe first item in the set.
Returns
- bool
True if the item is NOT in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
t1TThe first item in the set.
t2TThe second item in the set.
Returns
- bool
True if the item is NOT in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
t1TThe first item in the set.
t2TThe second item in the set.
t3TThe third item in the set.
Returns
- bool
True if the item is NOT in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to search for.
setT[]The set of items to search.
Returns
- bool
True if the item is NOT in the set; otherwise, false.
Type Parameters
TThe 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
itemTThe item to compare.
otherTThe other item to compare with.
Returns
- bool
True if
itemandotherare not equal; otherwise, false.
Type Parameters
TThe type of the items being compared.