Equals() public method

public Equals ( char obj ) : bool
obj char
return bool
Example #1
0
 /// <summary><c>isDigit</c>
 /// Checks the given char if it's a digit.</summary>
 /// <param name="val">Any char</param>
 /// <returns type="char">is char digit ('0'-'9')</returns>
 private bool isDigit(Char val)
 {
     return val.Equals('1') || val.Equals('2') ||
         val.Equals('3') || val.Equals('4') ||
         val.Equals('5') || val.Equals('6') ||
         val.Equals('7') || val.Equals('8') ||
         val.Equals('9') || val.Equals('0');
 }
 private Boolean IsOperator(Char expression)
 {
     return expression.Equals(Convert.ToChar(ADD)) ||
                 expression.Equals(Convert.ToChar(SUBTRACT)) ||
                 expression.Equals(Convert.ToChar(MULTIPLY)) ||
                 expression.Equals(Convert.ToChar(DIVIDE)) ||
                 expression.Equals(Convert.ToChar(MODULUS)) ||
                 expression.Equals(Convert.ToChar(EXPONENT)) ||
                 expression.Equals(Convert.ToChar(DICEROll));
 }
Example #3
0
        static StackObject *Equals_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Char @obj = (char)ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Char instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack);

            var result_of_this_method = instance_of_this_method.Equals(@obj);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
Example #4
0
 protected Boolean IsValidRatingChar(Char c)
 {
     return Char.IsDigit(c) || c.Equals('.');
 }
 private Boolean IsElementStart(Char c)
 {
     return c.Equals('<');
 }
Example #6
0
 /// <summary><c>isVariable</c>
 /// Checks the given char if it's a variable. x | y | z
 /// <param name="val">Any char</param>
 /// <returns type="char">is char x|y|z</returns></summary>
 private bool isVariable(Char val)
 {
     return val.Equals('x') || val.Equals('y') || val.Equals('z');
 }
Example #7
0
 /// <summary><c>isTerm</c>
 /// Checks the given char is '*' or '/'
 /// <param name="val">Any char</param>
 /// <returns type="bool">is char '*' or '/'</returns></summary>
 private bool isTerm(Char val)
 {
     return val.Equals('*') || val.Equals('/');
 }
Example #8
0
 /// <summary><c>isExp</c>
 /// Checks the given char is '+' or '-'
 /// <param name="val">Any char</param>
 /// <returns type="bool">is char '+' or '-'</returns></summary>
 private bool isExp(Char val)
 {
     return val.Equals('+') || val.Equals('-');
 }