c # generate dll file and call

First, the use vs2017 generate dll file

New Project -> Library -> Build Solution, write a simple implementation addition dll file

Second, the new project calls dll file

New Project -> Application Forms

 The MyTestDll.dll MyTestDll projects debug folder copied to the debug folder of the project, add a reference -> View -> MyTestDll.dll

On the plus namespace using MyTestDll

Button realization:

 Note: The first instance of the class, and then call the methods in the class.

Last Function:

 

Guess you like

Origin www.cnblogs.com/moon-boke/p/11423053.html