Current .Net Version: 1.1.4322
Home
Articles
Practice C# Online
C# Reference
XML Web Services
RSS Feeds
T-SQL Scripts
Valuable Links
Contact Us
C# Reference
List: Search:

static
Is a:Modifier Keyword
Applies to Version:C# 1.0 and later
Namespace:N/A
Assembly:N/A (N/A)
Description:Marks class or struct members as being accessible via the type name of the containing class or struct, and rather than via the object reference to the class or struct. In other words, you cannot access members defined as static via an instance variable.
Example(s):Test test = new Test(); // oops, this will cause and error too: test.s = "Hello to you too!"; // this will NOT cause an error: Test.s = "Hello to you too!";
 
COPYRIGHT/DISCLAIMER | CONTACT US