Late Binding -- Reflection

  • Thread starter Thread starter MeDhanush
  • Start date Start date
M

MeDhanush

Do I have to use Reflection for late binding.., OR any other ways for
late binding .NET Framework ?

Are there any uses of Reflection in Application Development apart from
using it in developing tools or compilers ?

TIA
Kishore
 
Do I have to use Reflection for late binding.., OR any other ways for
late binding .NET Framework ?

Reflection is the only way.
Are there any uses of Reflection in Application Development apart from
using it in developing tools or compilers ?

Sure. Plug-in development can benefit from reflection. You define an
interface that all plug-ins must implement. Then you load a DLL and use
reflection to see if any classes in the DLL implement the plug-in
interface. You can then use reflection to instantiate and execute
methods on that class.
 
Kishore,
Are there any uses of Reflection in Application Development apart from
using it in developing tools or compilers ?

The "Pluggable Selector" pattern is a pattern that can be implemented using
Reflection, however in .NET I think I would use a Delegate variable instead.

See "Test-Driven Development - By Example", by Kent Beck, from Addison
Wesley.

Hope this helps
Jay
 
Patrick,

If the class implements the interface, would you really need to use
reflection to execute the methods. I would simply assign the object to a
variable of the specific interface, then use that variable...

Yes. That would be the way to do it.
 
Jay,

Thanks for the info

Kishore

Jay B. Harlow said:
Kishore,

The "Pluggable Selector" pattern is a pattern that can be implemented using
Reflection, however in .NET I think I would use a Delegate variable instead.

See "Test-Driven Development - By Example", by Kent Beck, from Addison
Wesley.

Hope this helps
Jay
 
Back
Top