Implementation of Private Assembly in C#

In this Article we will discuss about how to implement the private Assembly in C#.
  • 2362

To create the Private Assembly we will follow the following steps:

  1. First open the Visual Studio 2010.

  2. Then click on File menu then New menu option.
     
  3. Then click on Project menu and select  the Class Library template.
     
  4. Then Give the name to your DLL and remember the location and click on OK.
     
  5. Then write the following DLL code.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace mydll

{

    public class operation

    {

        public int add(int x, int y)

        {

            int sum = x + y;

            return sum;

        }

    }

}

Then press F6 or Click on Build Solution on Build menu to compile the DLL.

Now our DLL has been build and ready to be used in other applications by adding reference of it. Here we have given the name to our DLL 'mydll'.

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 
© 2020 DotNetHeaven. All rights reserved.