locked
How do I automate a managed application using Reflection? RRS feed

  • Question

  • How do I automate a managed application using Reflection?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, April 8, 2009 6:20 AM

Answers

All replies

  • With .NET Reflection, we can access the type, property, and method in another managed assembly.  

    Here is an MSDN magazine article by James McCaffrey, which discusses this topic.  The code sample inside is really helpful for us to understand.
    http://msdn.microsoft.com/en-us/magazine/cc163864.aspx

     

    For more FAQ about Visual C# General, please see Visual C# General FAQ

     



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, April 8, 2009 6:21 AM
  • Introduction and Reference:

    The common language runtime loader manages application domains, which are constituent defined boundaries around objects that have the same application scope.  This management includes loading each assembly into the appropriate application domain and controlling the memory layout of the type hierarchy within each assembly.

    Assemblies contain modules, modules contain types, and types contain members.  Reflection provides objects that encapsulate assemblies, modules, and types.  You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object.  You can then invoke the type’s methods or access its fields and properties. 

    For more details, please refer to this MSDN documentation:
    http://msdn.microsoft.com/en-us/library/f7ykdhsy.aspx

    Here is a MSDN magazine article on .NET Reflection by Mike Repass.
    http://msdn.microsoft.com/en-us/magazine/cc163408.aspx

     



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, April 8, 2009 6:22 AM