Skip to content

Instantly share code, notes, and snippets.

@VladimirReshetnikov
Created January 29, 2014 02:02
Show Gist options
  • Select an option

  • Save VladimirReshetnikov/8680476 to your computer and use it in GitHub Desktop.

Select an option

Save VladimirReshetnikov/8680476 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
struct S
{
ValueType x;
static void Main()
{
var s = new S();
ValueType v = s;
dynamic d = v;
d.x = v;
s = (S) v;
var set = new HashSet<S> { s };
Console.WriteLine(set.Contains(s)); // Can you tell the result?
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment