static class Program { static void Main(string[] args) { var aaa = Create<AAA>("aaa"); aaa.AAAAAA(); var bbb = Create<BBB>("bbb"); bbb.BBBBBB(); Console.ReadKey(); } static T Create<T>(string connString) { return (T)Activator.CreateInstance(typeof(T), new object[] { connString }); } } public class AAA { private string str; public AAA(string input) { str = input; } public string AAAAAA() { return "AAA" + str; } } public class BBB { private string str; public BBB(string input) { str = input; } public string BBBBBB() { return "BBB" + str; } }