Expand answers, suggesting to use the base class Control. I would make your function an extension to avoid creating ASDFHelper, ASDFUtility and other classes, static methods.
static public void PrintFormElement(this Control element){
element.DrawToBitmap();
}
Then it can be called in this way.
new TextBox().PrintFormElement();
source
share