Load DLL at runtime in C# and invoke a method

Sdílet
Vložit
  • čas přidán 11. 07. 2020
  • This video shows how we can write a simple code to load an assembly file (DLL) and create an object to invoke a method.
    Credit:
    Music: CZcams Audio Library
  • Věda a technologie

Komentáře • 24

  • @charliegallie2026
    @charliegallie2026 Před 3 lety +8

    It took me way too long to find this video. Thank you very much.

  • @rool105
    @rool105 Před 2 lety +2

    Thank you, ur video didn't really solve my problem, but I found a solution while watching it ^) Maybe it is because of this relaxing music as I was about to smash my notebook, and this is the calm I needed

  • @pedroquinonezverdugo9146
    @pedroquinonezverdugo9146 Před 3 lety +1

    You are inmortal, friend... :)

  • @trueindian2108
    @trueindian2108 Před 2 lety

    Thank you very much! Superb video.

  • @meanmachine570
    @meanmachine570 Před 2 lety

    thanks bro really appreciated

  • @sanjayajanakantha7883
    @sanjayajanakantha7883 Před 2 lety

    it works for me, Thank U

  • @noamblei
    @noamblei Před 3 lety

    Excelent explanation!

  • @illumi98
    @illumi98 Před 10 měsíci

    Hi, may i ask why u use CreateInstance? Is it for to instantiate the dll class? If yes, what if i use static class in my dll so tht my user can use it without any instantiate it first, do i still have to instantiate the dll class everytime i want to use its members?

  • @EloiTeaching
    @EloiTeaching Před rokem

    Thanks for the video. Succed to to it in VS but not in Unity. Don't know why.

  • @illumi98
    @illumi98 Před 10 měsíci

    Im using vstudio 2022, and the "type" returned null

  • @djp6390
    @djp6390 Před rokem

    Thank you

  • @user-bc8fm8kp5h
    @user-bc8fm8kp5h Před 4 měsíci

    CS0009 datagrid columns. dll could not be opened invalid culture name in C#

  • @gonzaloperez6508
    @gonzaloperez6508 Před 4 měsíci

    Gracias!

  • @enrique4322
    @enrique4322 Před rokem

    hiii!! do you know how in C# , load a Third part DLL , I´ve just only has documentation of the Methods of the DLL, but I do not Know what is inside. COuld you guide me? please

  • @abodeofsrisritharini962
    @abodeofsrisritharini962 Před 3 lety +1

    Hello! How to do the same method if i want to import multiple dlls(i wouldnt know which method i am using)? Thankyou!

    • @markgutierrez9295
      @markgutierrez9295 Před 3 lety

      I would think that the best way would be to make all your DLLs have the same “main” function that you can invoke. So that you just GetMethod the same for all “MainInit” or whatever and you can Invoke them all the same. That’s my thoughts.

  • @catalinafernandez2504
    @catalinafernandez2504 Před 4 měsíci

    Thank you very much! Does this support concurrency, that is, on a website where I search for products?

    • @gautammokal
      @gautammokal  Před 4 měsíci

      Thanks for watching this video. Concurrency in .NET application can be achieved using 'async await'.

  • @pavannaidu9825
    @pavannaidu9825 Před 2 lety

    How to generate traces at runtime like instrumentation without changing the application code using c#

  • @electricalinfo9114
    @electricalinfo9114 Před 6 měsíci

    hi there , any other way also to use reflections in c#?

    • @gautammokal
      @gautammokal  Před 6 měsíci

      Thanks for watching this video. There are multiple ways to use reflection. There is System.Reflection namespace in dotnet.