Click here to Skip to main content
15,908,841 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
want basic code for classlibrary.cs function and how to implement namespace.my first project i need some guidense.
Posted
Comments
Prerak Patel 6-Sep-11 1:30am    
Not clear.

You can create a class library Project, Once it build, it will create DLL and then reuse your C# code in other projects.
Step :
File | New Project | Select Template Type "ClassLibrary"
This will have a class file, you can use the same / rename or add a new files. Build it. It will create a dll.
Here is one step by step guide, which may help you.
How to Create a Class Library in C# .NET[^]
 
Share this answer
 
Comments
raj_sagoo 6-Sep-11 2:16am    
i just want to display 'Hello World' and make its dll.can you provide me with a code.
Actually when you start creating a new class library project, Visual studio will add the first class for you, in the namespace you give to the project and sets up the project properties.

So I suggest that you create a dll project and before making any modifications, investigate what the template already built for you and then move on to examples for small, easy-to-understand solutions.
 
Share this answer
 
Comments
raj_sagoo 6-Sep-11 2:17am    
i just want to display 'Hello World' and make its dll.can you provide me with a code.
There is no such thing as "basic code" here. Write the code you want.

Also, namespaces is not something which needs "implementation". This is just some (valid) name you choose for your namespaces, put in namespace declaration and put your types under one or another namespace. It does not affect any functionality whatsoever, used just to have identical simple names for different types, resolved as different thanks to different fully-qualified names defined by the namespaces.

—SA
 
Share this answer
 
Comments
raj_sagoo 6-Sep-11 2:18am    
i am at learning process and just started ,i am googling here and there and i am got confused,i just want to display 'Hello World' and make its dll.can you provide me with a code.

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