PageRenderTime 26ms CodeModel.GetById 22ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/csharp/throw_exception_runme.cs

#
C# | 24 lines | 23 code | 1 blank | 0 comment | 0 complexity | 4d04fce1c009b49d4b8fff66b7d28f77 MD5 | raw file
 1using System;
 2using throw_exceptionNamespace;
 3
 4public class runme
 5{
 6    static void Main() {
 7        Foo f = new Foo();
 8        try {
 9            f.test_int();
10            throw new Exception("Integer exception should have been thrown");
11        } catch (System.Exception) {
12        }
13        try {
14            f.test_msg();
15            throw new Exception("String exception should have been thrown");
16        } catch (System.Exception) {
17        }
18        try {
19            f.test_cls();
20            throw new Exception("Class exception should have been thrown");
21        } catch (System.Exception) {
22        }
23    }
24}