/// <summary> /// Returns a value indicating whether this instance is equal to a specified object. /// </summary> /// /// <returns> /// true if <paramref name="obj"/> is an instance of ObscuredChar and equals the value of this instance; otherwise, false. /// </returns> /// <param name="obj">An object to compare with this instance, or null. </param><filterpriority>2</filterpriority> public override bool Equals(object obj) { if (!(obj is ObscuredChar)) { return(false); } ObscuredChar ob = (ObscuredChar)obj; return(hiddenValue == ob.hiddenValue); }
/// <summary> /// Returns a value indicating whether this instance and a specified ObscuredChar object represent the same value. /// </summary> /// /// <returns> /// true if <paramref name="obj"/> is equal to this instance; otherwise, false. /// </returns> /// <param name="obj">An ObscuredChar object to compare to this instance.</param><filterpriority>2</filterpriority> public bool Equals(ObscuredChar obj) { return(hiddenValue == obj.hiddenValue); }