< Dice‎ | DieResult
Revision as of 19:03, 25 April 2017 by Skizzerz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DieResult Constructor ()

From DiceRoller Documentation

Constructs a new default DieResult.

  • Namespace: Dice
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

public DieResult()

Remarks

When calling this constructor, the object initializer syntax should be used in order to fill in DieType and Value. Failing to do this will result in an invalid DieResult.

Examples

The following example constructs a new DieResult using the default constructor, and uses the object initializer syntax to initialize its properties to correct values.

DieResult die = new DieResult()
{
    DieType = DieType.Normal,
    NumSides = 20,
    Value = 3,
    Flags = 0
};