良い感じでジェネリクスを使えたような気がするけど、どうなんだろう。
using System; class Factory { static void Main(string[] args) { Prop prop = Factory.NewInstance<Prop>((h) => { h.Age = 30; }); Console.WriteLine(prop.Name); Console.WriteLine(prop.Age); } public static T NewInstance<T>(Action<T> initializer = null) where T : PropBase, new() { T t = new T() { Name = "hoge" }; if (initializer != null) { initializer(t); } return t; } } class PropBase { public string Name { get; set; } } class Prop : PropBase { public int Age { get; set; } }