Referencing an assembly or Loading an assembly at runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    Referencing an assembly or Loading an assembly at runtime

    I wanted to know a thing...
    Are there any performance issues.. when you reference an assembly or load the assembly through Reflection
  • Monomachus
    Recognized Expert New Member
    • Apr 2008
    • 127

    #2
    Originally posted by ThatThatGuy
    I wanted to know a thing...
    Are there any performance issues.. when you reference an assembly or load the assembly through Reflection
    Yes there are performance issues. With reflection it's always like these. Though if you'll use it in a balanced manner the issues created by reflection could be acceptable.

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      Originally posted by Monomachus
      Yes there are performance issues. With reflection it's always like these. Though if you'll use it in a balanced manner the issues created by reflection could be acceptable.
      So what do you mean by those statements....

      Should we use reflection or add assembly reference...

      Comment

      • Monomachus
        Recognized Expert New Member
        • Apr 2008
        • 127

        #4
        Originally posted by ThatThatGuy
        So what do you mean by those statements....

        Should we use reflection or add assembly reference...
        If there is such a possibility I'd definitely add an assembly reference - this is my choise.
        It isn't too recommended because it creates coupling and dependencies, but for me it is 90% of the time better than using reflexion to do it.

        The only cases when I think I would choose reflexion is when you have an add-in kind-of system in your application. For example I had an application where depending on the assemblies I would have added some features. I used there reflexion to load assemblies to have those functionalities .

        Comment

        Working...