We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9fab87 commit 2bb54edCopy full SHA for 2bb54ed
docs/csharp/programming-guide/classes-and-structs/codesnippet/CSharp/interfaces_2.cs
@@ -7,13 +7,8 @@ public class Car : IEquatable<Car>
7
// Implementation of IEquatable<T> interface
8
public bool Equals(Car car)
9
{
10
- if (this.Make == car.Make &&
11
- this.Model == car.Model &&
12
- this.Year == car.Year)
13
- {
14
- return true;
15
- }
16
- else
17
- return false;
+ return this.Make == car.Make &&
+ this.Model == car.Model &&
+ this.Year == car.Year;
18
}
19
+ }
0 commit comments