Let's say I have a generic class.
public class PagerInfo<T>
{
// ...
}
And I want to pass an instance of this class to a method in another class.
public void Pagination(PagerInfo pagerInfo)
{
// ...
}
The method above won't compile because I didn't provide a type argument. But what if I want this method to work regardless of the type. That is, I want this method to operate on a PagerInfo
instances regardless of the type. And my method will not access any type-specific methods or properties.
Also, note that my actual method is in an ASP.NET MVC cshtml helper method and not a regular cs file.