56
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
5
namespace ConsoleApplication1
6
{
7
public class Program
8
{
9
internal class Resident
10
{
11
public int Id { get; set; }
12
public string Name { get; set; }
13
public string City { get; set; }
14
}
15
16
17
internal class ResidentNameComparer : IEqualityComparer<Resident>
18
{
19
public bool Equals(Resident x, Resident y)
20
{
21
if (string.Equals(x.Name, y.Name, StringComparison.OrdinalIgnoreCase))
22
{
23
return true;
24
}
Cached Result
(*)(((*((((*))))(((*(*))))*)))
True
12
12
6
True
12
12
6