class Program
{
static void Main(string[] args)
{
new Wtf { Foo = "FOO" }.GetHashCode();
}
private struct Wtf
{
public string Foo { get; set; }
public override int GetHashCode() => new { A = Foo }.GetHashCode();
}
}
If I set a breakpoint here new { A = Foo }.GetHashCode()
and open the quickwatch window, the following expressions give different results:
new { A = Foo }.GetHashCode()
this.GetHashCode()
What am I doing wrong?