< Dice | RollResult
RollResult.InvalidRoll Field
From DiceRoller Documentation
This RollResult is used as a placeholder whenever an invalid roll is added to a RollPost.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public static readonly RollResult InvalidRoll
Field Value
Type: Dice.RollResult
The placeholder result indicating an invalid roll.
Remarks
This is a sentinel value used for invalid rolls. You can test if a given roll is invalid by using the ==
operator. For example, myRoll == RollResult.InvalidRoll
. Do not attempt to compare using reference equality, as a deserialized RollResult may be an invalid roll but will be a different object (in memory) than RollResult.InvalidRoll. In other words, ensure that both sides of the equality comparison are cast to RollResult before executing the check.