/// <summary>
        /// Selects an operator at random.
        /// </summary>
        /// <returns>The operator.</returns>
        /// <param name="returnType">Return type of the operator.</param>
        public static bool TrySelectOperatorAtRandom(
            byte returnType,
            out OperatorSignature signatureOut)
        {
            if (operatorList == null)
            {
                throw new InvalidOperationException("operatorList is null");
            }

            List <OperatorSignature> candidates = new List <OperatorSignature> ();

            foreach (OperatorSignature signature in operatorList)
            {
                if (signature.ReturnType == returnType)
                {
                    candidates.Add(signature);
                }
            }

            if (candidates.Count == 0)
            {
                signatureOut = null;
                return(false);
            }

            int index = CommonHelperMethods.GetRandomPositiveInt0ToValue(candidates.Count - 1);

            signatureOut = candidates [index];
            return(true);
        }
        /// <summary>
        /// Adds the operator.
        /// </summary>
        /// <param name="signature">Signature.</param>
        public static void AddOperator(byte value, byte returnTypeIn, byte lhsTypeIn, byte rhsTypeIn)
        {
            OperatorSignature signature = new OperatorSignature(value, returnTypeIn, lhsTypeIn, rhsTypeIn);

            operatorList.Add(signature);
        }