Given a list of rectangles,
var myList = new List<Rectangle>();
I cannot add anything but Rectangles to this list, so what factors would make me prefer
Rectangle lastRect = myList.Last<Rectangle>();
over simply
Rectangle lastRect = myList.Last();
These are exactly the same.
The thing is, the compiler uses type inference to understand what the type is, if possible.
It sees you’re using a generic function on a generic type, and tries to match between them. And it works.
Short answer: These are the same, but the compiler adds the
<Rectangle>for you, using type inference.