public static T CreateBaseClass <T>() where T : BaseClass, new() { // Create and return a BaseClass. // Everything in BaseClass should be accessible here. //example BaseClassFunctionHolder holder = new BaseClassFunctionHolder(); T baseClass = _createBaseClass(holder); //access to baseClass methods through holder.DoStuff, and holder.DoOtherStuff return(baseClass); }
private BaseClass(BaseClassFunctionHolder holder) { holder.DoStuff = DoStuff; holder.DoOtherStuff = DoOtherStuff; }