diff --git a/SWIG/Examples/test-suite/csharp/default_constructor_runme.cs b/SWIG/Examples/test-suite/csharp/default_constructor_runme.cs new file mode 100644 index 000000000..7379d7a38 --- /dev/null +++ b/SWIG/Examples/test-suite/csharp/default_constructor_runme.cs @@ -0,0 +1,23 @@ +using System; + +public class runme +{ + static void Main() + { + // calling protected destructor test + try { + using (G g = new G()) { + } + throw new Exception("Protected destructor exception should have been thrown"); + } catch (MethodAccessException e) { + } + + // calling private destructor test + try { + using (FFF f = new FFF()) { + } + throw new Exception("Private destructor exception should have been thrown"); + } catch (MethodAccessException e) { + } + } +}