小编Fiz*_*izz的帖子

为什么这样做?

为什么这样做?我不是在抱怨,只是想知道.

void Test()
{    
    int a = 1;
    int b = 2;

    What<int>(a, b);
    // Why does this next line work?
    What(a, b);
}

void What<T>(T a, T b)
{

}
Run Code Online (Sandbox Code Playgroud)

.net c# generics type-inference

10
推荐指数
4
解决办法
505
查看次数

标签 统计

.net ×1

c# ×1

generics ×1

type-inference ×1