Generation Enumeration

Specifies how numbers should be randomly generated.

Definition

Namespace: Jodosoft.Numerics
Assembly: Jodosoft.Numerics (in Jodosoft.Numerics.dll) Version: 2.0
public enum Generation

Members

Default0 Numbers will be generated according the conventions established by Random:
  • Lower bounds are inclusive and upper bounds are exclusive.
  • An ArgumentOutOfRangeException is thrown if the lower bound is greater than the upper bound.
  • If no lower bound is specified then values returned are greater than or equal to zero.
  • If no upper bound is specified then values returned are less than the MaxValue constant for integral types, otherwise less than one.
  • If the bounds are equal then the lower bound is returned.
Extended1 Numbers will be generated with extended bounds:
  • Both upper and lower bounds are inclusive.
  • The upper and lower bounds will be swapped if specified in reverse order.
  • If no lower bound is specified then values returned are greater than or equal to the MinValue constant.
  • If no upper bound is specified then values returned are less than or equal to the MaxValue constant.
  • If the bounds are equal then the lower bound is returned.

See Also