using System;
public class Boo<T>
{
public void Foo(int index)
{
Console.WriteLine("Foo(int)");
}
public void Foo(T key)
{
Console.WriteLine("Foo(T)");
}
}
internal static class Program
{
private static void Main()
{
Boo<int> boo = new Boo<int>();
boo.Foo(0);
}
}
private static void Main()
{
Boo<int> boo = new Boo<int>();
boo.Foo(0);
CallFooByKey(boo, 0);
}
static void CallFooByKey<T>(Boo<T> boo, T key)
{
boo.Foo(key);
}
private static void Main()
{
Boo<int> boo = new Boo<int>();
boo.Foo(0);
boo.FooByKey(0);
}
public static void FooByKey<T>(this Boo<T> boo, T key)
{
boo.Foo(key);
}
public void foo(T key)
{
if (key.GetType().Equals(typeof(int)))
foo((int)key);
else
Console.WriteLine("Foo(T)");
}
HTH
"pagerintas pritupimas" <o...@com.net> wrote in message
news:uNwGf7B...@TK2MSFTNGP05.phx.gbl...