CollectionExtensionsMinorityT(IEnumerableT, Boolean, IEqualityComparerT) Method
Returns the minority value in the collection, or default type value if no item represents the minority.
Namespace: Gemstone.Collections.CollectionExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static T Minority<T>(
this IEnumerable<T>? source,
bool forwardSearch = true,
IEqualityComparer<T>? comparer = null
)
<ExtensionAttribute>
Public Shared Function Minority(Of T) (
source As IEnumerable(Of T),
Optional forwardSearch As Boolean = true,
Optional comparer As IEqualityComparer(Of T) = Nothing
) As T
public:
[ExtensionAttribute]
generic<typename T>
static T Minority(
IEnumerable<T>^ source,
bool forwardSearch = true,
IEqualityComparer<T>^ comparer = nullptr
)
JavaScript does not support generic types or methods.
- source IEnumerableT
- An enumeration over which to find the minority element.
- forwardSearch Boolean (Optional)
- true to search forward in source; otherwise false to search backwards.
- comparer IEqualityComparerT (Optional)
- The IEqualityComparerT implementation to use when comparing keys, or null to use the default comparer for the type of the key.
- T
- Type of elements in the source.
TThe minority value in the collection.In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).