PIbd-21. Shanygin A.V. Lab work 08 #8

Closed
Extrimal wants to merge 2 commits from laba8 into laba7
Showing only changes of commit 3c08c1472f - Show all commits

View File

@ -17,7 +17,10 @@ namespace AircraftCarrier.Generics
}
public bool Equals(AircraftsCollectionInfo? other)
{
return Name == other.Name;
if (ReferenceEquals(other, null))
return false;
return Name.Equals(other.Name);
}
public override int GetHashCode()
{