开发者

Facing C# Generic List problem what could be the problem? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. 开发者_如何学Python

This is my code,

public int countItems(List<T> Items)
{
    return 0;
}

What could be the problem?


Assuming that the method isn't in a type that declares the type-parameter T, it needs to do so of its own accord:

public int countItems<T>(List<T> Items)
{
    return 0;
}


Facing C# Generic List problem what could be the problem? [closed]

Same with your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜