Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
C# & .Net Framework Reference
Constants (C#)

Full Name:
Constants (C#)

Short Name:
Constants (C#)

Type of Entity:
C#

Abstract:
Classes and structs can declare constants as members. Constants are values which are known at compile time and do not change. (To create a constant value that is initialized at runtime, use the readonly keyword.) Constants are declared as a field, using the const keyword before the type of the field. Constants must be initialized as they are declared. For example:

MSDN Source URL:
http://msdn2.microsoft.com/ms173119.aspx

 
COPYRIGHT/DISCLAIMER | CONTACT US