Tutorial - Class Library .DLL For C# - Codementor
Tutorial - Class Library .DLL For C# - Codementor
This tutorial shows, how to build a simple Class Library .DLL in the C# Programming
Language. The Class Library .DLL contains program code, data, and resources that
can be can used by other programs and are easily implemented into other Visual
Studio projects.
Select either the Proffessional, Community or Enterprise Edition and press the
download button.
When you have downloaded an installer of your choice, run it by double clicking
the downloaded file. An installer dialog will appear on your screen.
In the Workloads Tab view, Select .NET Desktop Development if you want to
develop for the Windows Desktop
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 2/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
And then select Class Library (.NET Framework) and press the NEXT button
Press the CREATE button, After you have given a name to your project
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 3/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 4/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 5/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 6/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
namespace MathLibrary
{
public class Class1
{
public float Substract(float a, float b)
{
return a - b;
}
To build your project, choose Build Solution from the Build menu.
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 7/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
And then select Console App (.NET Framework) and press the NEXT button
Press the CREATE button, After you have given a name to your project
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 8/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 9/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
Adding MathLibrary.dll
Enjoy this post? as a Reference 2
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 10/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
NOTE: to Add Custom References, click the References tab. Click the Add
References button to open the Add Reference dialog box. In the Add Reference
dialog box, select the Browse tab indicating the type of component you want to
reference. Select the components you want to reference, and then click OK.
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 11/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 12/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 13/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
namespace MathApplication
{
class Program
{
static void Main(string[] args)
{
// Declare class from MathLibrary.dll
Class1 math = new Class1();
Console.ReadLine();
}
}
}
To build your project, choose Build Solution from the Build menu.
To run the code, on the menu bar, choose Debug > Start Debugging. A console
window opens and then runs your app.
By using Codementor, you agree to our Cookie Policy. ACCEPT
To run the code with hotkeys, Press Ctrl + F5 to run your project
Enjoy this post? 2
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 14/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
You can download the C# Source Code for the MathLibrary.dll & Console App
Project for testing and editing Download Source Code
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 15/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
WRITE A POST
Enjoy this post? Give Thomas Marco de Haan a like if it's helpful.
2 SHARE
FOLLOW
Leave a reply
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 16/17
5/14/2020 Tutorial - Class Library .DLL for C# | Codementor
By now, we've all heard about React Navigation V5. It comes with a bunch of
improvements and a completely new approach to configuration that is component
based vs API based. You can learn more about this new version here.
React Navigation v5 is a big release that completely changes how your navigation is
configured. That being said, it is understandable that with such a release, upgrading
and understanding everything going on can be difficult. This is why boilerplates like
Ignite Bowser are g ... READ MORE
https://www.codementor.io/@dewetvanthomas/tutorial-class-library-dll-for-c-129spithmr 17/17