using System;
public class Starter {
public static void Main() {
XClass obj = new XClass();
}
}
public class MyClass {
~MyClass() {
Console.WriteLine("MyClass destructor");
}
}
public class YClass : MyClass {
~YClass() {
Console.WriteLine("YClass destructor");
}
}
public class XClass : YClass {
~XClass() {
Console.WriteLine("XClass destructor");
}
}
|