public override bool Equals(object obj) { if (obj is AccessIPRange) { AccessIPRange tmp = obj as AccessIPRange; return((StartAddress.Equals(tmp.StartAddress)) && (EndAddress.Equals(tmp.EndAddress))); } return(false); }
/// <summary> /// Compares two IP address ranges. /// </summary> /// <returns> /// <see langword="true" /> if the two address ranges are equal; otherwise, <see langword="false" />. /// </returns> /// <param name="other">An <see cref="IPRange" /> instance to compare to the current instance. </param> public bool Equals(IPRange other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(StartAddress.Equals(other.StartAddress) && EndAddress.Equals(other.EndAddress)); }
public override bool Equals(Object obj) { MemorySection <T> personObj = obj as MemorySection <T>; if (personObj == null) { return(false); } else { return(Name.Equals(personObj.Name) && StartAddress.Equals(personObj.StartAddress) && EndAddress.Equals(personObj.EndAddress) && IsSymbol.Equals(personObj.IsSymbol)); } }
/// <summary> /// Compares two IP address ranges. /// </summary> /// <returns> /// <see langword="true" /> if the two address ranges are equal; otherwise, <see langword="false" />. /// </returns> /// <param name="comparand">An <see cref="IPRange" /> instance to compare to the current instance. </param> private bool Equals(IPRange comparand) { return(StartAddress.Equals(comparand.StartAddress) && EndAddress.Equals(comparand.EndAddress)); }