От: | Mab | http://shade.msu.ru/~mab | |
Дата: | 20.09.10 19:56 | ||
Оценка: | 66 (4) |
class Goodbye
{
public Goodbye()
{
Console.WriteLine("hello");
}
~Goodbye()
{
Console.WriteLine("goodbye");
}
}
static void Main()
{
new Goodbye();
GC.Collect();
GC.WaitForPendingFinalizers();
}
hello
goodbye
class Goodbye
class Goodbye : DontSayGoodbye
hello