I'm trying to define a method that has multiple constraints where the T
type is able to be used as a constructor:
private void GetData<T, OType>(string url, string token1, string token2, Action<T, SqlConnection, SqlTransaction> bulkInsert, string user = null, string pwd = null)
where T : JsonElements<OType>, new
where OType : class
{
var thing = T();
I'm getting an error on the new
part though saying
) expected
What's the right syntax for this?