What is the meaning of the following syntax? Specifically, the braces <>?
public T Execute<T>(RestRequest request) where T : new()
{ .... }
Here's what I've figured out:
The function's visibility is defined as public.
T stands for the return type (probably defined somewhere else in code)
The function parameter list (RestRequest request) The only parameter is request.
The final bits - ExecuteT>... where T: new() is weird and unfamiliar to me.
Perhaps related, but what exactly does the following return? (In other words, does it return a function, an object, or a pointer to something?)
return Execute<Call>(request);
Both lines of code were extracted from the RestSharp documentation wiki example code - https://github.com/restsharp/RestSharp/wiki/Recommended-Usage