Class IntegerEnumerableExtensions
Extensions for integer enumerables
Inheritance
System.Object
IntegerEnumerableExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Common.Lib
Assembly: ImageVault.Common.dll
Syntax
public static class IntegerEnumerableExtensions
Methods
SelectLesserOrEqualItem(IEnumerable<Int32>, Int32)
Returns the first item in the supplied list that is lesser or equal to the supplied value. If no value is lesser or equal, the last item in the list is returned.
Declaration
public static int SelectLesserOrEqualItem(this IEnumerable<int> list, int val)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Int32> | list | The list of integers to look through. Must be sorted in descending order |
System.Int32 | val | The value to compare with |
Returns
Type | Description |
---|---|
System.Int32 | The first value from the list that is
|
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
System.ArgumentException | If |