---
title: "Create Private Assembly Application in C#"  
description: "Lets know about how the Private Assembly are working in C#"  
author: "Anonymous User"  
published: 2021-07-05  
updated: 2021-07-05  
canonical: https://www.mindstick.com/articles/327210/create-private-assembly-application-in-c-sharp  
category: "c#"  
tags: ["visual studio", "visual studio 2017"]  
reading_time: 2 minutes  

---

# Create Private Assembly Application in C#

Let's see the how can make the Private assembly and use it : \
Step 1 : Open [Visual Studio](https://www.mindstick.com/forum/12863/how-to-insert-a-video-in-asp-dot-net-web-page-in-visual-studio-2010) 2019 on your machine create a [class file](https://www.mindstick.com/forum/60/how-we-add-dll-with-other-class-file) with a valid [Class name](https://www.mindstick.com/forum/12871/how-to-get-class-name)(In my project I've named it 'PAssembly'). Now click next after completing and your new project will successfully created. Step 2 : Now start writing the basic code. In my scenario I've created [one constructor](https://www.mindstick.com/forum/159223/how-can-i-call-one-constructor-from-another-in-java) and one function in which I've print some sort of normal message.

| using System; \ [namespace](https://www.mindstick.com/blog/681/namespace-and-class) PAssembly \ { \ public class PrivateAssembly \ { \ public PrivateAssembly() \ { \ Console.WriteLine('Private Assembly Called'); \ } \ [public void](https://www.mindstick.com/interview/2715/can-we-write-static-public-void-instead-of-public-static-void) privateAssemblyFunc() \ { \ Console.WriteLine('Private Assembly Function Called'); \ } \ } \ } \ \ |
| --- |

\
Step 3 : After completing with these codes build the code by just pressing the shortcut key on [your keyboard](https://answers.mindstick.com/qa/108654/what-to-do-if-your-keyboard-is-not-working) 'Ctrl+Shift+B' or you can go to the Build in menu bar and create by clicking on Build Solution. Now your DLL file will be created. Step 4 : Create a new [Console Application](https://answers.mindstick.com/qa/49661/how-to-create-a-small-game-program-in-c-sharp-console-application) by using shortcut key on your keyboard Ctrl+Shift+N or by go into the File in menu bar > New > Project. Step 5 : Add dll file which you have created in [your application](https://answers.mindstick.com/qa/97584/how-do-you-choose-the-correct-camera-for-your-application) by right click on the Project Name on Search Solution Explorer and add the reference by going on Add > Project Reference. Step 6 : Now Add the Namespace at the top create an object of your Dll file and call the function which you have created in it.

| using System; \ using PAssembly; \ namespace PrivateAssemblyApplication \ { \ class Program \ { \ static void Main(string[] args) \ { \ PrivateAssembly obj = new PrivateAssembly(); \ obj.privateAssemblyFunc(); \ } \ } \ }\ |
| --- |

\
Step 7 : Now, press Ctrl+F5 on your keyboard or go to the Debug in the menu bar and click on 'Start without Debugging'. Now you'll see the Message which you have created in the Constructor or in a function of your Dll File in Console. \
\
Now, You have successfully know use of the Private Assembly. \

---

Original Source: https://www.mindstick.com/articles/327210/create-private-assembly-application-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
