+ return d5 () == "10" ? 0 : 1;
+ }
+
+ delegate long LongDelegate (long l);
+
+ static long long_delegate (long l) {
+ return l + 1;
+ }
+
+ public static int test_56_long () {
+ LongDelegate l = new LongDelegate (long_delegate);
+
+ return (int)l (55);
+ }
+
+ delegate float FloatDelegate (float l);
+
+ static float float_delegate (float l) {
+ return l + 1;
+ }
+
+ public static int test_56_float () {
+ FloatDelegate l = new FloatDelegate (float_delegate);
+
+ return (int)l (55);
+ }
+
+ delegate double DoubleDelegate (double l);
+
+ static double double_delegate (double l) {
+ return l + 1;
+ }
+
+ public static int test_56_double () {
+ DoubleDelegate l = new DoubleDelegate (double_delegate);
+
+ return (int)l (55);
+ }
+
+ static int count = 0;
+
+ public static void inc_count () {
+ count ++;
+ }
+
+ public static int test_0_multicast () {
+ SimpleDelegate d = new SimpleDelegate (inc_count);
+
+ d += inc_count;
+
+ d ();
+ return count == 2 ? 0 : 1;
+ }
+
+ public delegate int Delegate0 ();
+
+ public delegate int Delegate1 (int i);
+
+ public delegate int Delegate2 (int i, int j);
+
+ public int int_field;
+
+ public int adder0 () {
+ return int_field;
+ }
+
+ public static int adder0_static () {
+ return 1;
+ }
+
+ public int adder1 (int i) {
+ return int_field + i;
+ }
+
+ public static int adder1_static (int i) {
+ return i;
+ }
+
+ public int adder2 (int i, int j) {
+ return int_field + i + j;
+ }
+
+ public static int adder2_static (int i, int j) {
+ return i + j;
+ }
+
+ public static int test_0_delegate_opt () {
+ Tests d = new Tests ();
+ d.int_field = 1;
+
+ if (new Delegate0 (d.adder0) () != 1)