Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello guys, Im new to C# and i wonder two things

1)is therea difference if i start my code with a class library or an empty project?

2)when you add a new iteam to a project you can see that there are plenty of options, between those there are two call "class"and "class library" what are the diferences?

Thanks very much
Posted

1 solution

1) The class library project will give you a DLL assembly and also generate a default class for you. The empty project gives you nothing, and will default to an Exe assembly.

2) You can add a class to a project. You cannot add a class library to a project, but you can add a class library project to a solution (that's probably what confused you).
 
Share this answer
 
Comments
Chirry 29-Oct-10 14:52pm    
Is the DLL the dynamic link library?
So it is always better to start a project with a class library and then just add the required class am i getting it right?
Nishant i do really appreciatee your helpp thank you so much. Blessings
Nish Nishant 29-Oct-10 14:53pm    
Yes, if your goal is to create a DLL, then that would be your best approach.
Chirry 29-Oct-10 14:58pm    
I think i will need it , im trying to build an audio editor application for my final project, im doing it in C# and this language is new to me.
I do really thank youu
Nish Nishant 29-Oct-10 15:01pm    
No problem, you are welcome. Feel free to ask more questions as you progress further.
Toli Cuturicu 29-Oct-10 15:19pm    
The class library will also add a few default references, while the empty project adds none.

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