VisualStudio writes its own dll

VisualStudio writes a dll

Specific operations

Created a class library application in visual studio, here I choose the first one

Insert image description here

To implement the dll, I wrote as follows

namespace MyDll
{
    public class MyTestDll
    {
        public MyTestDll() { }

        public void Print()
        {
            Console.WriteLine("hello!");
        } 
    }
}

Click [Your Project], right-click the project name, click Generate, and then open the folder where the project is located.

Insert image description here

Open bin/debug (or release) and find your project name.dll (MyDll.dll here). This is the dll you wrote. At this point, you have implemented a dll.

image-20231222150705891
Of course you have to use the dll after implementing it. Here is the link to import the local dll: Use your own dll

Guess you like

Origin blog.csdn.net/m0_54165465/article/details/135153948