Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everybody i am new for creating dlls in .net.what my problem is i want to convert class file to dll,for the shake of use this class file into another project. how can i do it. plz can any one give reply soon.



Thanks in advanced!
Posted

Hi,
simply you can create classlibrary project from visual studio.
file->new->project->class library
and compile it and use it's dll file whereever you want to use.

Use this link also..
http://gowrishaan.wordpress.com/2009/05/22/how-to-make-class-cs-file-into-dll/[^]
 
Share this answer
 
Frist Step:-> In Microsoft visual studio file->new->project


Second Step:-> choose project type as c# and template will be class libraries


Third Step:-> the project name was classdll


Fourth Step:-> check the classdll location in your hard disk, there is one folder name was bin->debug-> here only your class file will convert into dll


Fifth Step:-> your file name was class1.cs


Sixth Step:-> first add your libraries whatever you want


Seventh Step:-> it show the error (missing assembly reference) you have to add the some libraries move to


Project->addreference->.net(tab) add your dll files…

Eight Step:->
Above like this
Nineth Step:-> you can placed your .cs coding in the class1 method
public class Class1
{
public long Add(long val1)//don’t give the static method
{
return val1;
}
}
 
Share this answer
 
v2
 
Share this answer
 
See this links

Video1[^]

Video2[^]

Thanks
 
Share this answer
 
it is better to use create class library to create DLL
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900