[Test]
public void TestDefaults()
{
var b = new B();
Console.WriteLine(GetValueI(b));
Console.WriteLine(GetValueC(b));
Console.WriteLine(b.Sum(1));
Console.WriteLine(((IA)b).Sum(1));
}
private static int GetValueI(IA b)
{
return b.Sum(1);
}
private static int GetValueC(B b)
{
return b.Sum(1);
}
interface IA
{
int Sum(int a, int b = 5);
}
private
(
Read more... )