public void Compare(CarMake carmake2, string prefix) { var areEqual = Equals(carmake2); var areEqualText = areEqual ? string.Empty : "not "; Console.Write(prefix); Console.WriteLine("is {0}the same vehicle", areEqualText); Console.WriteLine(); }
private bool Equals(CarMake carmake) { return(carmake != null && GetType() == carmake.GetType() && Model == carmake.Model); }