we know that with the help of reflection we can create instance of a class dynamically at run time and can call the method of the class very easily. so this point reflection is late binding because action is taken at run time. so i just want know reflection is faster or not.
what is the performance of reflection. is it good or bad…is it resource hungry. please discuss. thnks.
we know that with the help of reflection we can create instance of a
Share
Technically speaking reflection is a performance hit. But if you’re doing something that needs it then you have to use it. If you can go without it, avoid it.
EDIT
To further emphasize, reflection is neither good or bad. Its in the Framework because there’s very legitimate reasons to use it. That said, 90% of the time that I see someone using reflection they’re trying to do something the hard way, not knowing the easy route. Often its because they don’t know about generics.