Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
Event registration app with QR/Paypal
Home
Wednesday, January 14, 2015
Readonly vs const in C#
A const field can only be initialized at the declaration of the field.
A readonly field can be initialized either at the declaration or in a constructor
http://msdn.microsoft.com/en-us/library/vstudio/acdd6hb7(v=vs.100).aspx
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment