OperatorConverter.IsBinary(string) - YiZhang-Paul/Mock_Up_Calculator GitHub Wiki

Namespace: ConverterClassLibrary

Description: Checks if an operator is a binary operator.

Parameters Description
token<string> input to be examined
Returns Description
bool true when token is a binary operator

Examples:

string[] operators = { "+", "-", "!" };
var unarys = new HashSet<string>() { "!" };
var converter = new OperatorConverter(operators, unarys);

Console.WriteLine(converter.IsBinary("+")); //true
Console.WriteLine(converter.IsBinary("-")); //true
Console.WriteLine(converter.IsBinary("!")); //false
⚠️ **GitHub.com Fallback** ⚠️