【C#】ジェネリック引数付きコンストラクタ

C#では テンプレート型のコンストラクタに引数が渡せません using System; public class Foo<T> where T : new() { public Foo() { new T(1); } } `T': cannot provide arguments when creating an instance of a variable type 詳細:Compiler Error CS0417 Type.GetConstructor 使用すれば解決可能です using System; publi</t>…