I am writing a method that will take a screenshot of a passed form element, and print it out. There are a few challenges I am facing. I want to be able to make this method generic enough to accept just about any type of form element. I set the "element" argument to type "object". I think I will also need to pass a "type" argument or is there a way to figure out what type the object is after it is passed?
static public void PrintFormElement(object element, ?type?){
}
Am I approaching this problem the right way? Any advice would be appreciated thanks!