Class IntegerExtensions
Provides extension methods for System.Int16, System.Int32 and System.Int64.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class IntegerExtensions
Methods
| Improve this DocMax(Int16, Int16)
Returns the larger of two 16-bit signed integers.
Declaration
public static short Max(this short value, short minimum)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | value | The first of two 16-bit signed integers to compare. |
System.Int16 | minimum | The second of two 16-bit signed integers to compare. |
Returns
Type | Description |
---|---|
System.Int16 | Parameter |
Max(Int32, Int32)
Returns the larger of two 32-bit signed integers.
Declaration
public static int Max(this int value, int minimum)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The first of two 32-bit signed integers to compare. |
System.Int32 | minimum | The second of two 32-bit signed integers to compare. |
Returns
Type | Description |
---|---|
System.Int32 | Parameter |
Max(Int64, Int64)
Returns the larger of two 64-bit signed integers.
Declaration
public static long Max(this long value, long minimum)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | The first of two 64-bit signed integers to compare. |
System.Int64 | minimum | The second of two 64-bit signed integers to compare. |
Returns
Type | Description |
---|---|
System.Int64 | Parameter |
Min(Int16, Int16)
Returns the smaller of two 16-bit signed integers.
Declaration
public static short Min(this short value, short maximum)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | value | The first of two 16-bit signed integers to compare. |
System.Int16 | maximum | The second of two 16-bit signed integers to compare. |
Returns
Type | Description |
---|---|
System.Int16 | Parameter |
Min(Int32, Int32)
Returns the smaller of two 32-bit signed integers.
Declaration
public static int Min(this int value, int maximum)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The first of two 32-bit signed integers to compare. |
System.Int32 | maximum | The second of two 32-bit signed integers to compare. |
Returns
Type | Description |
---|---|
System.Int32 | Parameter |
Min(Int64, Int64)
Returns the smaller of two 64-bit signed integers.
Declaration
public static long Min(this long value, long maximum)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | The first of two 64-bit signed integers to compare. |
System.Int64 | maximum | The second of two 64-bit signed integers to compare. |
Returns
Type | Description |
---|---|
System.Int64 | Parameter |