Hi Guys
Today I'll show you how to create a DLL and use it in your application instead of writing the full code in your project.
Step 1:
Create a New Class Library as Shown below
Spoiler (Click to View)
Step 2:
Name the class as you want then add your code as shown below
Spoiler (Click to View)
As you can see, my code is a simple Math operations and you can add your own code. So let's build it and close VS.
You'll find your dll in the release folder
Step 3:
Now our Dll is ready to use so let's make an application which will use the Dll.
Spoiler (Click to View)
Step 4:
Now we have to add a reference to our Dll
GoTo Project -> Add Reference, and browse to where your Dll is located.
Spoiler (Click to View)
Step 5:
Ok, Now let's write our application and don't forget to import the Dll
Spoiler (Click to View)
Now we're done. so let's compile the project and test it.
Result:
Spoiler (Click to View)
Ok, that's it. Now I need your feedback
Thanks for reading🤝
Today I'll show you how to create a DLL and use it in your application instead of writing the full code in your project.
Step 1:
Create a New Class Library as Shown below
Spoiler (Click to View)
Step 2:
Name the class as you want then add your code as shown below
Spoiler (Click to View)
As you can see, my code is a simple Math operations and you can add your own code. So let's build it and close VS.
You'll find your dll in the release folder
Step 3:
Now our Dll is ready to use so let's make an application which will use the Dll.
Spoiler (Click to View)
Step 4:
Now we have to add a reference to our Dll
GoTo Project -> Add Reference, and browse to where your Dll is located.
Spoiler (Click to View)
Step 5:
Ok, Now let's write our application and don't forget to import the Dll
Spoiler (Click to View)
Now we're done. so let's compile the project and test it.
Result:
Spoiler (Click to View)
Ok, that's it. Now I need your feedback
Thanks for reading🤝


![[Image: zUBs1FH.gif]](https://i.imgur.com/zUBs1FH.gif)