What exactly is Reflection? I read the Wikipedia article on this subject and I understand that it is a kind of meta-programming, where the program can modify itself at run-
It's not so much modifying code at execution time, but examining objects and asking them to execute code without knowing their type statically.
One simple way of describing it would be "a somewhat painful way of making a statically typed language behave dynamically."
EDIT: Uses:
SubmitButton_Click and ASP.NET will attach that method as a handler for the SubmitButton's Click event (if you have autowiring turned on)Is it a good idea? Well, only when the alternatives are painful. I prefer static typing when it doesn't get in the way - then you get lots of compile-time goodness, and it's faster too. But when you do need it, reflection lets you do various things which otherwise just wouldn't be possible.