swig/Examples/test-suite/csharp/default_constructor_runme.cs
William S Fulton ca3ef48e62 protected and private destructor test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-11 09:16:40 +00:00

23 lines
583 B
C#

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) {
}
}
}