Permalink
Browse files

fido cannot be found in the shelter

  • Loading branch information...
camilin87 committed Jan 30, 2016
1 parent 7abeb0d commit d91504bfedcb60ab86fffe72dcac88fb775405de
Showing with 7 additions and 3 deletions.
  1. +7 −3 Program.cs
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;

namespace consoleapplication1
{
@@ -18,10 +19,13 @@ public class Program
{
public static void Main(string[] args)
{
var fido1 = new Dog { Name = "Fido", Weight = 12 };
var fido2 = new Dog { Name = "Fido", Weight = 12 };
var dogShelter = new Dictionary<Dog, int>{
{new Dog { Name = "Fido", Weight = 12 }, 100},
{new Dog { Name = "Pete", Weight = 5 }, 10}
};
var fido = new Dog { Name = "Fido", Weight = 12 };

Console.WriteLine($"Equals {fido1.Equals(fido2)}");
Console.WriteLine($"Dog is In Shelter: {dogShelter.ContainsKey(fido)}");
}
}
}

0 comments on commit d91504b

Please sign in to comment.