using System.Collections.Generic;
public static void Main()
var test = new Testy<int> { Value = 5 };
Console.WriteLine(test == 5);
public class Testy<T> : IEquatable<T>
public T Value { get; set; }
public bool Equals(T other)
return EqualityComparer<T>.Default.Equals(this.Value, other);