1 2 3 4 5 6 7 8 9 10
class Foo { public bool contains (int item) { return item == 42; } } void main () { var foo = new Foo (); assert (42 in foo); }