I’m having following problem.
I should convert a control to a certain type, this can be multiple types
(for example a custom button or a custom label, ….)
Here’s an example of what i would like to do:
private void ConvertToTypeAndUseCustomProperty(Control c)
{
Type type = c.getType();
((type) c).CustomPropertieOfControl = 234567;
}
Thanks in advance
Although C#, before 4.0, doesn’t support dynamic type resolution as VB does, it can be achieved with a little bit of reflection.