nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / Numeric

Numeric

Full name Microsoft.VisualBasic.Language.Numeric Assembly Microsoft.VisualBasic.Runtime Members 19

Defines a generalized type-specific comparison method that a value type or class implements to order or sort its instances.

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:

  1. Value Meaning Less than zero This instance precedes obj in the sort order.
  1. Zero This instance occurs in the same position in the sort order as obj.
  1. 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

NameOverloadsSummary
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

NameOverloadsSummary
yes 1
no 1

04 Members

method MaxIndex #
MaxIndex``1(IEnumerable(Of ``0))

Numeric.MaxIndex() The max element its index in the source collection.

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
sourceIEnumerable(Of ``0)

-

Returns

A zero-based index offset for the item with max value, -1 means empty collection

method Equals #
Equals``1(``0, ``0)

=

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
a``0

-

b``0

-

method LessThan #
LessThan``1(``0, ``0)

<

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
a``0

-

b``0

-

method GreaterThan #
GreaterThan``1(``0, ``0)

a > b

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
a``0

-

b``0

-

method LessThanOrEquals #
LessThanOrEquals``1(``0, ``0)

**a** <= **b**

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
a``0

-

b``0

-

method GreaterThanOrEquals #
GreaterThanOrEquals``1(``0, ``0)

=>

Type Parameters
NameDescription
T
Parameters
NameTypeDescription
a``0

-

b``0

-

method NextInteger #
NextInteger(Random, Int32)

ListExtensions.Random() get next integer in the specific range max

Parameters
NameTypeDescription
rndRandom

-

maxInt32

-

field yes #
yes
field no #
no
method MaxIndex #
MaxIndex(IEnumerable(Of T))
method MinIndex #
MinIndex(IEnumerable(Of T))
method Equals #
Equals(T, T)
method LessThan #
LessThan(T, T)
method GreaterThan #
GreaterThan(T, T)
method LessThanOrEquals #
LessThanOrEquals(T, T)
method GreaterThanOrEquals #
GreaterThanOrEquals(T, T)
method ToUInt32 #
ToUInt32(Single)
method ToUInt64 #
ToUInt64(Double)
method Reverse #
Reverse(UInt32)