Click here to Skip to main content
12,943,299 members (77,589 online)
Rate this:
Please Sign up or sign in to vote.
See more:
How to make and use a dll in C#..
Posted 16-Jan-13 4:33am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

To create a DLL you need to create a class library project in c# which once compiled will create the DLL.

To use the DLL you just need to add a reference to the DLL in your project

Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Right click your solution in the Solution Explorer pane, and select "Add..."..."New Project"
In the dialog that appears, Select C# as the language on the left, then "Class Library" on the right.
Change the "Name" at the bottom to something that describes what the DLL is to contain: "VideoControls" or "ImageSlideShow" perhaps.
Press Ok.
A new project will have been added to your solution.
If you want to access it from your other projects in the same solution, then right click "References" under each project name, and select "Add Reference".
In the dialog that appears, select "projects" on the left hand side, highlight your DLL name on the right, and press "Add". The close the dialog.

To use it in external projects, build it for release and add it as a reference in the normal way, browsing to the release version of the DLL.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

open new project as class library, type code and build it.

it will make reusable .dll file for you.
another way if you have written code in windows based application, go to solution explorer select your application right click it and select property,

you will see the output type you can change it to class library,
remember to build only, if you try to debug it it will throw an error!

After successfully creating a .dll file you can use it to another application by:
right click your application on solution explorer, select Add reference and browse where the .dll is allocated..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,633
CHill60 2,880
Maciej Los 2,268
Jochen Arndt 1,900
ppolymorphe 1,755

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100