Difference between revisions of "Dice/DieResult/DieResult ()"

From DiceRoller Documentation
(Created page with "{{APIdoc|DieResult Constructor ()}} Constructs a new default DieResult. == Syntax == <syntaxhighlight lang="C#"> public DieResult() </syntaxhighlight> == Remarks == When cal...")
 
m
 
Line 1: Line 1:
 
{{APIdoc|DieResult Constructor ()}}
 
{{APIdoc|DieResult Constructor ()}}
 
Constructs a new default DieResult.
 
Constructs a new default DieResult.
 +
 +
{{ns}}
  
 
== Syntax ==
 
== Syntax ==

Latest revision as of 19:03, 25 April 2017

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
};