Click here to Skip to main content
15,917,061 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what exactly does the word "static" mean?
Posted

Did you try to search for?
We have even an article about: "Static Keyword Demystified"[^].
 
Share this answer
 
Few smark folks created something called Google[^], which is free, easy to use and really works.

Please always try to Google it yourself and thn come here (or to any other forum) with questions. People here would not give a new defintion but in most of the cases will point to an article or tell you what they have leart over the years reading those articles on internet.
 
Share this answer
 
static = not(dynamic)
not(dynamic) = no instance specific
no instance specific = class specific
in VB we use Shared Keyword instead of static
so, static = shared
1 class multiple instance sharing same variable/method

so that,

static variables & methods can directly call using classname.

real time example:
you want to count how many objects created of particular class
then declare static variable and increment-decrements value when you are create new instance of that class & dispose that instance

Happy Coding!
:)
 
Share this answer
 
v2
If you give static for a variable or method, we can access them without creating its object. Is this the answer you want or anything else? Please let me know..
 
Share this answer
 
Static Keyword.<br />
<br />
<br />
1.A static method can access only static fields.<br />
2.A static method cannot access non-static fields.<br />
3.A static method cannot be called using object of a class.<br />
4.A static method can be called using Class name.<br />
5.Static fields can be used using Class Name.<br />
<br />
<a href="http://www.dotnetfunda.com/articles/article1186-static-keyword-in-csharp.aspx">Static Keyword in C#</a>[<a href="http://www.dotnetfunda.com/articles/article1186-static-keyword-in-csharp.aspx" target="_blank" title="New Window">^</a>]<br />
<br />
Hope that helps!
 
Share this answer
 
 
Share this answer
 
hi the static word is a saved word in c# language and used when you want to definition one class or variable or function or... that it is unchangeable,and in all classes is stable with initial value that you are setting it;
 
Share this answer
 
Comments
Richard MacCutchan 25-Feb-14 7:25am    
Please do not add answers ot old questions. Especially ones which already contain plenty of answers.

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