/trunk/Examples/test-suite/csharp/default_constructor_runme.cs
C# | 24 lines | 20 code | 2 blank | 2 comment | 0 complexity | 1705081c50191e2f9cb632d77ae4914d MD5 | raw file
1using System; 2using default_constructorNamespace; 3 4public class runme 5{ 6 static void Main() 7 { 8 // calling protected destructor test 9 try { 10 using (G g = new G()) { 11 } 12 throw new Exception("Protected destructor exception should have been thrown"); 13 } catch (MethodAccessException) { 14 } 15 16 // calling private destructor test 17 try { 18 using (FFF f = new FFF()) { 19 } 20 throw new Exception("Private destructor exception should have been thrown"); 21 } catch (MethodAccessException) { 22 } 23 } 24}