예제 #1
0
        public bool Equals(Weight other)
        {
            if (other is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(WeightRange == other.WeightRange && Kilograms.Equals(other.Kilograms) && IsMetric == other.IsMetric);
        }
예제 #2
0
 public bool Equals(Weight other) =>
 Kilograms.Equals(other.Kilograms);