---
title: "Creating DLL File in C# with Visual Studio Code | Dyanmic Link Library(DLL)"  
description: "Dynamic Link Library(DLL) file is a library that contains the predefined functions and codes which can help you to use it directly in your snippets."  
author: "Anonymous User"  
published: 2021-07-01  
updated: 2021-07-02  
canonical: https://www.mindstick.com/articles/327183/creating-dll-file-in-c-sharp-with-visual-studio-code-dyanmic-link-library-dll  
category: "c#"  
tags: ["visual studio"]  
reading_time: 2 minutes  

---

# Creating DLL File in C# with Visual Studio Code | Dyanmic Link Library(DLL)

Now, we are going to learn, how to create a **DLL [file in C#](https://www.mindstick.com/forum/161575/how-do-you-read-binary-data-from-a-file-in-c-sharp)** with the help of [Visual Studio](https://www.mindstick.com/forum/12863/how-to-insert-a-video-in-asp-dot-net-web-page-in-visual-studio-2010) Code.

Step 1 : Open Visual [Studio Code](https://www.mindstick.com/forum/159163/indent-format-code-in-visual-studio-code-on-mac) on [your computer](https://answers.mindstick.com/qa/99040/how-you-can-protect-your-computer-from-viruses-and-malware) by easily search with the help of shortcut key Command+spacebar (For Windows User you can search it on Windows Search option which is present in the slight right of start menu at the bottom).

![Creating DLL File in C# with Visual Studio Code | Dyanmic Link Library(DLL)](https://www.mindstick.com/mindstickarticle/60aa666c-4674-4c30-8879-edbce4054fbb/images/d34080bd-2f11-4401-8dff-b5117c7b7509.png)\

Step 2 : Select files on VS Code and click on New, after selecting click on Project and then select Visual C#([Class Library](https://www.mindstick.com/forum/157445/how-to-use-asp-dot-net-core-apis-in-the-class-library)). Name the project according to [your Project](https://answers.mindstick.com/qa/93843/is-it-necessary-to-add-bootstrap-js-and-bootstrap-css-both-in-your-project) and then hit the OK Button.

![Creating DLL File in C# with Visual Studio Code | Dyanmic Link Library(DLL)](https://www.mindstick.com/mindstickarticle/60aa666c-4674-4c30-8879-edbce4054fbb/images/3b5c4bbe-2275-4db5-bbfe-98f547e17496.png)

\

Step 3 : After this [your Default](https://answers.mindstick.com/qa/95660/how-do-you-remove-firefox-as-your-default-browser) [Boiler Plate](https://www.mindstick.com/forum/156529/boiler-plate-in-vs-code) will generate in the Editor. now, you have to change the change the [class name](https://www.mindstick.com/forum/12871/how-to-get-class-name) of your class(Default class name will be class1.cs you have to change according to your Project Need. Like you are creating a Average [Calculator Program](https://www.mindstick.com/forum/69/calculator-program-in-c-sharp) you have to named it as average.cs )

![Creating DLL File in C# with Visual Studio Code | Dyanmic Link Library(DLL)](https://www.mindstick.com/mindstickarticle/60aa666c-4674-4c30-8879-edbce4054fbb/images/b3991b8d-955c-4fbf-8f6b-9e2fc38e097a.png)\

Step 4 : Now build the Code you've done by pressing the F6 key on the keyboard. Now you can see your average.dll file in the 'bin/debug' Directory of your project.

![Creating DLL File in C# with Visual Studio Code | Dyanmic Link Library(DLL)](https://www.mindstick.com/mindstickarticle/60aa666c-4674-4c30-8879-edbce4054fbb/images/f2ad6dc4-2c4b-4b9d-8b62-db43e8bfa599.png)\

Hurrah! You've created your first DLL file in Visual Studio. Now you can able to use it anywhere and save the snippet line of code and make your code more convenient.

---

Original Source: https://www.mindstick.com/articles/327183/creating-dll-file-in-c-sharp-with-visual-studio-code-dyanmic-link-library-dll

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
