Difference between revisions of "Dice/RollerConfig/MaxDice"

From DiceRoller Documentation
(Created page with "{{APIdoc|RollerConfig.MaxDice Property}} Gets or sets the maximum number of dice that may be rolled. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public uint MaxDice { ge...")
 
 
Line 6: Line 6:
 
== Syntax ==
 
== Syntax ==
 
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
public uint MaxDice { get; set; }
+
public int MaxDice { get; set; }
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=== Property Value ===
 
=== Property Value ===
Type: System.UInt32
+
Type: System.Int32
  
 
The maximum number of dice that may be rolled, including dice rolled due to rerolls or exploding dice. Exceeding this limit will result in a [[Dice/DiceException|DiceException]] being thrown with DiceErrorCode.TooManyDice.
 
The maximum number of dice that may be rolled, including dice rolled due to rerolls or exploding dice. Exceeding this limit will result in a [[Dice/DiceException|DiceException]] being thrown with DiceErrorCode.TooManyDice.

Latest revision as of 18:56, 13 April 2017

Gets or sets the maximum number of dice that may be rolled.

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

Syntax

public int MaxDice { get; set; }

Property Value

Type: System.Int32

The maximum number of dice that may be rolled, including dice rolled due to rerolls or exploding dice. Exceeding this limit will result in a DiceException being thrown with DiceErrorCode.TooManyDice.

Remarks

The default value for MaxDice is 1,000. It is recommended to not set this too high, as there is generally no need to roll hundreds or thousands of dice in the course of typical role-playing games, and increasing this limit will adversely impact both memory usage as well as the time taken to process dice rolls.