Facing C# Generic List problem what could be the problem? [closed]
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;
}
Same with your code.
精彩评论