Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
▼
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
No comments:
Post a Comment