< Dice | FunctionRegistry
Difference between revisions of "Dice/FunctionRegistry/Remove"
From DiceRoller Documentation
(Created page with "{{APIdoc|FunctionRegistry.Remove Method (String, FunctionScope)}} Removes the function with the given name and scope. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public...") |
(No difference)
|
Revision as of 19:29, 24 April 2017
Removes the function with the given name and scope.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public void Remove(
string name,
FunctionScope scope
)
Parameters
- name
- Type: System.String
- Name of the function to remove, case-insensitive.
- scope
- Type: Dice.FunctionScope
- Scope of the function to remove the name from.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | name is null .
|
ArgumentException | name refers to a reserved function name. |
Remarks
Reserved function names (dropLowest, reroll, success, critical, etc.) are not actually implemented as functions, and cannot therefore be removed. Actual built-in functions (max, min, round, if, etc.) can be removed, however. If a function with a given name and scope does not exist, no error is thrown.