Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
How to make and use a dll in C#..
Posted 16-Jan-13 4:33am
Rate this: bad
good
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
 
Links
 
http://msdn.microsoft.com/en-us/library/3707x96z%28v=vs.80%29.aspx[^]
 
http://stackoverflow.com/questions/9830127/referencing-a-dll-in-c-sharp[^]
 
http://msdn.microsoft.com/en-us/library/wkze6zky%28v=vs.80%29.aspx[^]
  Permalink  
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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..
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2014
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