public static ascx_LogViewer add_LogViewer <T>(this T control) where T : Control { var logControl = control.add_Control <ascx_LogViewer>(); DebugMsg.startShowThread(); //ensure the show thread is started return(logControl); }