< Dice‎ | DiceFunctionAttribute
Revision as of 20:07, 12 April 2017 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|DiceFunctionAttribute Constructor (String)}} Constructs a new instance of DiceFunctionAttribute. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public DiceFunction...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DiceFunctionAttribute Constructor (String)

From DiceRoller Documentation

Constructs a new instance of DiceFunctionAttribute.

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

Syntax

public DiceFunctionAttribute(
    string name
)

Parameters

name
Type: System.String
The name of the dice function, case insensitive.

Exceptions

Exception Condition
ArgumentNullException name is null.

Remarks

Dice function names are case insensitive and must be unique for a given Scope. It is an error to define a dice function with the same name as a built-in function. Duplicate name errors are not caught as part of this constructor; rather, they are caught when registering the function.