CollectionExtensionsMajorityT(IEnumerableT, T, Boolean, IEqualityComparerT) Method
Returns the majority value in the collection, or defaultValue if no item represents the majority.
Namespace: Gemstone.Collections.CollectionExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.166 -- Release Build+d3cb24a90fe44346300dfbb17444d7b350f42d79
JavaScript does not support generic types or methods.
- source IEnumerableT
- An enumeration over which to find the majority element.
- defaultValue T
- Default value to return if no item represents the majority.
- 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 majority 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).