P
pagerintas pritupimas
Not that this is a real-life problem but how would you call a "second" Foo
method ?
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);
}
}
method ?
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);
}
}