Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git] / mcs / tests / test-139.cs
blob716fae37182f3b1ebb540eb482c2b343fb8fb1ee
1 //
2 // This tests two uses of the `This' expression on structs; being used as an argument
3 // and being used implicitly.
4 //
6 struct T {
7 int val;
8 void one () {
11 // First test: Pass this as an argument.
13 two (this);
16 void two (T t) {
17 this = t;
20 void three (ref T t) {
21 two (t);
25 public override int GetHashCode () {
27 // Second test: do we correctly load this?
29 return val.GetHashCode();
32 public static int Main()
34 T t = new T ();
36 t.one ();
38 t.GetHashCode ();
40 return 0;