How I can cast something using reflection
Example:
String typ = "TextBox"; (Reflection(typ))MyClass = (Reflection(typ))PointerClass.GetData(); |
MyClass should be a TextBox class with the Instance in the PointerClass.GetData() saved Data.
Thanks
Tony
String typ = "TextBox"; (Reflection(typ))MyClass = (Reflection(typ))PointerClass.GetData(); |
Cast with reflection
Dick Roose
Your question is not very clear. The way you are using Reflection is like a keyword - and I there is no Reflection keyword in C#.
if PointerClass.GetData is returning a type TextBox/Object then you don't need reflection you can directly cast it
TextBox MyClass = (TextBox)PointerClass.GetData();
If that's not the case, please elobrate what you are trying to acheive.
Regards,
Saurabh Nandu
www.MasterCSharp.com
www.AksTech.com