You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
730 B

5 years ago
namespace Calculator
{
internal class NumberElement : CalculationElement
{
public byte Value { get; }
public NumberElement(byte value)
{
Value = value;
}
public override string ToString()
{
return Value.ToString();
}
public override bool Equals(object obj)
{
return Equals(obj as NumberElement);
}
public bool Equals(NumberElement other)
{
return other != null &&
Value == other.Value;
}
public override int GetHashCode()
{
return -1937169414 + Value.GetHashCode();
}
}
}