SQL Server calls C #. NET written DLL, (Share my HelloWorld test)

xiaoxiao2021-03-06  64

SQL Server calls C #. Net writes DLL 1, constructs DLL: First we want it. Create a library project in Net, write a simple helloworldusing system;

A summary description of Namespace MyDLL {///

/// Class1. /// public class class1 {public class1 () {// // Todo: Add constructor logic //} public string Sayhello () {return "helloworld";}}} mydll is this DLL Name. After compiling, find myDLL.dll in your output directory; switch to command line mode, enter Sn -k mydll.snk to generate a key pair in mydll.dll's directory; then return to your vs. Under the NET project Open AssemblyInfo.cs [Assembly] option, enter your key to the path '..////bin//debug/-mydll.snk' recompile MyDLL.dll Finally, it is assembled. Enter the command line: regaSM mydll.dll, after success, copy mydll.dll to the c: / windows / askEMBLY directory (this step is to say, don't know what it is used. But actually I tried You can also call without copying).

转载请注明原文地址:https://www.9cbs.com/read-86355.html

New Post(0)