![]() |
От: | Хэлкар | |
Дата: | 18.06.08 17:59 | ||
Оценка: | 27 (4) |
using System;
namespace App
{
internal class Program
{
private static void Main(string[] args)
{
Test(new A());
Console.Read();
}
private static void Test<T>(T a)// where T:A
{
a.Print();
}
}
public static class Ext
{
public static void Print(this object a)
{
Console.WriteLine(0);
}
public static void Print(this A a)
{
Console.WriteLine(1);
}
}
public class A
{
}
}