Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi Everyone,

Can any one give brief description about Static class with real time example.

When we should use static class.

Can any one help me on this?

Thanks,
Posted
Comments
BillWoodruff 4-Nov-14 9:19am    
Is there any reason you can't do some reading on the web on this topic ?
ZurdoDev 4-Nov-14 9:20am    
Google will give you the answers. Do you have an actual specific question?
PIEBALDconsult 4-Nov-14 9:45am    
Libraries of static methods.

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 4-Nov-14 9:38am    
Should be quite enough, a 5.
—SA
Maciej Los 4-Nov-14 10:32am    
Thank you, Sergey ;)
Manas Bhardwaj 4-Nov-14 9:53am    
Yes +5!
Maciej Los 4-Nov-14 10:33am    
Thank you, Manas ;)
Quote:
Use a static class as a unit of organization for methods not associated with particular objects. Also, a static class can make your implementation simpler and faster because you do not have to create an object in order to call its methods.


You might want to go through this thread. A good read:

http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp[^]
 
Share this answer
 
Comments
Maciej Los 4-Nov-14 10:34am    
Nice!

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