linux-packaging-mono/mcs/tests/dtest-named-02.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

50 lines
608 B
C#

using System;
public class Test
{
static int counter;
static int M1 ()
{
if (counter != 2)
throw new ApplicationException ();
return counter++;
}
static int M2 ()
{
if (counter != 3)
throw new ApplicationException ();
return counter++;
}
static dynamic M3 ()
{
if (counter != 1)
throw new ApplicationException ();
return counter++;
}
static int Foo (int a, int b, int c)
{
if (a != 2)
return 1;
if (b != 3)
return 2;
if (c != 1)
return 3;
return 0;
}
public static int Main ()
{
counter = 1;
return Foo (c: M3 (), a: M1 (), b: M2 ());
}
}