/// <summary> /// Compares formats by name. /// </summary> /// <param name="f">The format.</param> /// <returns>wheter this object and f are equal by name.</returns> public bool Equals(FormatBase <SerialDataFormat> f) { if (f == null) { return(false); } return(f.Name == this.Name); }
/// <summary> /// Compares foramts by name. /// </summary> /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> /// <exception cref="T:System.NullReferenceException"> /// The <paramref name="obj"/> parameter is null. /// </exception> public override bool Equals(object obj) { FormatBase <SerialDataFormat> f = obj as FormatBase <SerialDataFormat>; return(Equals(f)); }