It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
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;
}
精彩评论