Defines a generalized type-specific comparison method that a value type or class implements to order or sort its instances.
Numeric
00 Remarks
Summary:
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Returns:
A value that indicates the relative order of the objects being compared. The return value has these meanings:
- Value Meaning Less than zero This instance precedes obj in the sort order.
- Zero This instance occurs in the same position in the sort order as obj.
- Greater than zero This instance follows obj in the sort order.
Exceptions:
T:System.ArgumentException: obj is not the same type as this instance.
01 Syntax
Microsoft.VisualBasic.Language.Numeric
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| MaxIndex | 1 | Numeric.MaxIndex())* The max element its index in the source collection. |
| Equals | 1 | = |
| LessThan | 1 | < |
| GreaterThan | 1 | a > b |
| LessThanOrEquals | 1 | a <= b |
| GreaterThanOrEquals | 1 | = |
| NextInteger | 1 | ListExtensions.Random()) get next integer in the specific range max |
| MaxIndex | 1 | |
| MinIndex | 1 | |
| Equals | 1 | |
| LessThan | 1 | |
| GreaterThan | 1 | |
| LessThanOrEquals | 1 | |
| GreaterThanOrEquals | 1 | |
| ToUInt32 | 1 | |
| ToUInt64 | 1 | |
| Reverse | 1 |
03 Fields
04 Members
MaxIndex``1(
IEnumerable(Of ``0))Numeric.MaxIndex() The max element its index in the source collection.
Type Parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
source | IEnumerable(Of ``0) | - |
Returns
A zero-based index offset for the item with max value, -1 means empty collection
Equals``1(
``0, ``0)=
Type Parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
a | ``0 | - |
b | ``0 | - |
LessThan``1(
``0, ``0)<
Type Parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
a | ``0 | - |
b | ``0 | - |
GreaterThan``1(
``0, ``0)a > b
Type Parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
a | ``0 | - |
b | ``0 | - |
LessThanOrEquals``1(
``0, ``0)**a** <= **b**
Type Parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
a | ``0 | - |
b | ``0 | - |
GreaterThanOrEquals``1(
``0, ``0)=>
Type Parameters
| Name | Description |
|---|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
a | ``0 | - |
b | ``0 | - |
NextInteger(
Random, Int32)ListExtensions.Random() get next integer in the specific range max
Parameters
| Name | Type | Description |
|---|---|---|
rnd | Random | - |
max | Int32 | - |
yes
no
MaxIndex(
IEnumerable(Of T))MinIndex(
IEnumerable(Of T))Equals(
T, T)LessThan(
T, T)GreaterThan(
T, T)LessThanOrEquals(
T, T)GreaterThanOrEquals(
T, T)ToUInt32(
Single)ToUInt64(
Double)Reverse(
UInt32)