protected and private destructor test

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-06-11 09:16:40 +00:00
commit f23a4c2ef7

View file

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