I recently started work at a new company and a .net web application we have is built using reflection. I have only been out of school for a year and haven’t worked with this concept. After studying the code… it looks like there is a single backend interface of type object that has about 20 classes that inherit from it. lots of generic gets and sets
On the surface it looks like standard inheritance to me. I guess my question is, what makes this reflection? Is it because the interface is not strongly typed?
Thanks
Please read about Reflection on Wikipedia first. Then check out the Reflection Namespace on MSDN.
I believe I know the general pattern that you are encountering. The need for reflection arises as the user can specify type and member names at runtime. The program then has to use reflection to map the supplied names to actual type members.
Generally speaking, if your program inspects object types at runtime, then you are using reflection.
BTW, Strong and Weak are attributes of the language type system, but not of any application or structure ( eg. interface, etc ) written using that language. ie. “C# is considered by many to be a strongly typed language”.