PIbd-21. Shanygin A.V. Lab work 08 #8
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user