C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Why should I create an instance of a class?


Posted Date: 07 Sep 2008      Total Responses: 1

Posted By: Goutham Anand       Member Level: Gold     Points: 1



Why should I create an instance of a class? What happens if I declare every class & method as static? Can anyone explain me the consequences?

I mean, internally what happens when we declare a class or method as static? And what happens internally when we create an instance for a class? Can anyone explain me?





Responses

Author: D.Jeya kumar(JK)    07 Sep 2008Member Level: DiamondRating:     Points: 6

Hi,


We can defined static methods .but i think it will occupy memory because it is public method and it can be accessed from any classes or methods. by defualt they are sealed and it can have only static methods.

Static classes are loaded automatically by the .NET Framework common language runtime (CLR) when the program or namespace containing the class is loaded.


Regards
JK



Post Reply
You must Sign In to post a response.
Next : MCTS (50-728 and 50-736)
Previous : How to run the exe file from ASP.Net
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use