Hi MartinWang-5107,
>>where T : class,new(),
Those are generic type constraints.
where T : class
Means that the type T must be a reference type (not a value type).
where T : new()
Means that the type T must have a parameter-less constructor.
In order to understand it better, please refer to the links below:
What does “where T : class, new()” mean?
Constraints on type parameters (C# Programming Guide)
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.