Exemplo n.º 1
0
	public static int Main ()
	{
		Struct s = new Struct ("1");
		var t = s.AsyncMethod ();
		if (!Task.WaitAll (new[] { t }, 2000))
			return 1;
		
		if (!t.Result)
			return 2;
		
		return 0;
	}
Exemplo n.º 2
0
    static int Main()
    {
        Struct s = new Struct("1");
        var    t = s.AsyncMethod();

        if (!Task.WaitAll(new[] { t }, 2000))
        {
            return(1);
        }

        if (!t.Result)
        {
            return(2);
        }

        return(0);
    }