Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Does class library works only for console application. If I have to display hello world, then we have to write console.write("Hello world") and further does it run in web base?
Posted
Updated 5-Sep-11 20:30pm
v3
Comments
Prerak Patel 6-Sep-11 2:30am    
Still not clear. Why don't you use 'Improve question'? Reposting same question won't help you anyway.

Yes.
Please stop posting same question again and again. It will help you to followup your answer and also, providing the answer.
You asked want basic code for class library function and how to implement namespace.[^]

and
how to write 'hello world' in classlibrary.cs[^]

Check out those answer.

I am sharing some useful tutorial for you. Please go through them .
http://www.dotnetheaven.com/Uploadfile/mahesh/pr1202172006014101AM/pr12.aspx[^]
http://msdn.microsoft.com/en-us/library/cc668164.aspx[^]
 
Share this answer
 
v2
Comments
raj_sagoo 6-Sep-11 2:48am    
we just have to add,using System
then' namespace MyClassLibrary1 in different project to inherit this dll.right?
Abhijit Jana 6-Sep-11 3:09am    
No, if your namespace is "TestNameSpace" , after adding the reference you need to add this. But do you know you can do it automatically ?

Check out my blog article here at Codeproject

http://www.codeproject.com/Articles/100222/One-of-my-favorite-Visual-Studio-Shortcuts-Very-us
raj_sagoo 6-Sep-11 3:52am    
if i delete the namespace MyClassLibrary1 in my default aspx.page,label1 is coming on which i have to display the text 'Hello World',but it is not coming when i add namespace MyClassLibrary1.?
raj_sagoo 6-Sep-11 4:18am    
ctrl+tab,class comes int the namsespace.
Class libraries are DLL's which you can reference in other projects, based on how you implemented the internals you can use them in any type of application, console, winforms, wpf, web etc.

Usually class libraries implement business logic without UI specifics so you can use them any where.

But you can have platform specific libraries for say winforms apps, which are collections of code you would like to use in multiple winform project to simplify your coding and maintenance.
 
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