Class DiceParser
The DiceParser class is used to parse a string into a DiceExpression
Inheritance
System.Object
DiceParser
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: RogueSharp.DiceNotation
Assembly: RogueSharp.dll
Syntax
public class DiceParser : IDiceParser
Constructors
| Improve this Doc View SourceDiceParser()
Construct a new instance of the DiceParser class
Declaration
public DiceParser()
Methods
| Improve this Doc View SourceParse(String)
Create a new DiceExpression by parsing the specified string
Declaration
public DiceExpression Parse(string expression)
Parameters
Type | Name | Description |
---|---|---|
System.String | expression | A dice notation string expression. Ex. 3d6+3 |
Returns
Type | Description |
---|---|
DiceExpression | A DiceExpression parsed from the specified string |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Invalid dice notation supplied |