Class Int32Extensions
LINQ-inspired extension methods for
Inheritance
Namespace: X10D.Linq
Assembly: X10D.dll
Syntax
public static class Int32Extensions : object
Methods
| Improve this Doc View SourceProduct(IEnumerable<Int32>)
Computes the product of a sequence of
Declaration
public static int Product(this IEnumerable<int> source)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.Int32> | source | A sequence of |
Returns
Type | Description |
---|---|
System.Int32 | The product the values in the sequence. |
Product(IEnumerable<UInt32>)
Computes the product of a sequence of
Declaration
public static uint Product(this IEnumerable<uint> source)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.UInt32> | source | A sequence of |
Returns
Type | Description |
---|---|
System.UInt32 | The product the values in the sequence. |
Product<TSource>(IEnumerable<TSource>, Func<TSource, Int32>)
Computes the product of a sequence of
Declaration
public static int Product<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TSource> | source | A sequence of values that are used to calculate a product. |
Func<TSource, System.Int32> | selector | A transform function to apply to each element. |
Returns
Type | Description |
---|---|
System.Int32 | The product of the projected values. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of |
Product<TSource>(IEnumerable<TSource>, Func<TSource, UInt32>)
Computes the product of a sequence of
Declaration
public static uint Product<TSource>(this IEnumerable<TSource> source, Func<TSource, uint> selector)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TSource> | source | A sequence of values that are used to calculate a product. |
Func<TSource, System.UInt32> | selector | A transform function to apply to each element. |
Returns
Type | Description |
---|---|
System.UInt32 | The product of the projected values. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of |
RangeTo(Int32, Int32)
Returns an enumerable sequence of 32-bit integers ranging from the current value to a specified value.
Declaration
public static IEnumerable<int> RangeTo(this int value, int end)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The starting value of the sequence. |
System.Int32 | end | The ending value of the sequence. |
Returns
Type | Description |
---|---|
IEnumerable<System.Int32> | An enumerable collection of 32-bit integers, ranging from |
RangeTo(Int32, Int64)
Returns an enumerable sequence of 64-bit integers ranging from the current value to a specified value.
Declaration
public static IEnumerable<long> RangeTo(this int value, long end)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The starting value of the sequence. |
System.Int64 | end | The ending value of the sequence. |
Returns
Type | Description |
---|---|
IEnumerable<System.Int64> | An enumerable collection of 64-bit integers, ranging from |