我有一个通用的功能,我想知道如何写.
List<Something> something;
public int countItems<T>(List<T> Items)
{
// Here I would like to compare the type of "Items" with the type of "something" to see if they are compatible. How do I do it?
return 0;
}
Run Code Online (Sandbox Code Playgroud)