5 void Foo (bool expected
);
12 public void Foo (bool expected
)
14 Console
.WriteLine (flag
);
16 throw new ApplicationException ();
24 static void M
<T
> (T x
)
26 object s
= x
?.ToString ();
27 System
.Console
.WriteLine (s
);
29 var h
= x
?.GetHashCode ();
30 System
.Console
.WriteLine (h
);
33 static void M2
<T
> (T
[] x
)
35 object s
= x
?.ToString ();
36 System
.Console
.WriteLine (s
);
38 var h
= x
?.GetHashCode ();
39 System
.Console
.WriteLine (h
);
42 static void M2_2
<T
> (T
[] x
)
44 object s
= x
[0]?.ToString ();
45 System
.Console
.WriteLine (s
);
47 var h
= x
[0]?.GetHashCode ();
48 System
.Console
.WriteLine (h
);
51 static void M3
<T
> (T
? x
) where T
: struct
53 object s
= x
?.ToString ();
54 System
.Console
.WriteLine (s
);
56 var h
= x
?.GetHashCode ();
57 System
.Console
.WriteLine (h
);
60 static void TestAddress_1
<T
> (T t
) where T
: I
66 static void TestAddress_2
<T
> (T
[] t
) where T
: I
83 M2_2 (new string [1]);
89 TestAddress_1 (new S ());
90 var ar
= new [] { new S () }
;