예제 #1
0
    public static void Main(string[] args)
    {
        MyTask task = new MyTask();

        // Most methods that call a SWI throw an OS.ErrorException if the
        // SWI returns an error.
        try
        {
            task.Init();
            task.Run();
        }
        catch (OS.ErrorException ex)
        {
            Reporter.WriteLine(ex.OSError.Message);
            Console.WriteLine("error number = {0}, error string = {1}",
                              ex.OSError.Number,
                              ex.OSError.Message);
        }
        finally
        {
            task.CloseDown();
        }
    }