O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Reflection and dynamic method invocation

Reflection has always been considered an 'advanced' topic in most programming books, probably because you seldom use it unless you are in the business of writing debuggers and introspection tools such as the Javabean Development Kit. I myself would try to avoid using reflection as much as possible if there are alternative ways to do things.

This particular chapter has been written in a very 'dry' style. I have simply included lots of short code examples showing how to perform certain reflection operations using reflection classes in the BCL. The intention is that you can refer back here when there is a need to write reflection codes. Like Java, reflection is largely dependent on the class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required