Permalink
Browse files

override the equals method

  • Loading branch information...
camilin87 committed Jan 30, 2016
1 parent 5d488e6 commit 7abeb0d9b8dbf7c09124485fb0f7e3bd18257b18
Showing with 6 additions and 0 deletions.
  1. +6 −0 Program.cs
@@ -6,6 +6,12 @@ public class Dog
{
public int Weight { get; set; }
public string Name { get; set; }

public override bool Equals(object obj)
{
var that = (Dog)obj;
return this.Weight == that.Weight && this.Name == that.Name;
}
}

public class Program

0 comments on commit 7abeb0d

Please sign in to comment.