xFunc.Maths.Tokens.FunctionToken.Equals C# (CSharp) Method

Equals() public method

Determines whether the specified object is equal to the current object.
public Equals ( object obj ) : bool
obj object The object to compare with the current object.
return bool
        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;

            if (this == obj)
                return true;

            if (typeof(FunctionToken) != obj.GetType())
                return false;

            var token = (FunctionToken)obj;

            return this.function == token.function && this.m_countOfParams == token.m_countOfParams;
        }

Usage Example

Esempio n. 1
0
        public void EqualsSameObjectTest()
        {
            var token = new FunctionToken(Functions.Sine, 1);

            Assert.True(token.Equals(token));
            Assert.Equal(token, token);
        }
All Usage Examples Of xFunc.Maths.Tokens.FunctionToken::Equals