Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

readonly vs const c#

readonly keyword is used to define a variable 
which can be assigned once after declaration 
either during declaration or in constructor. 
  
const keyword is used to define a constant to be used in the program.
 
PREVIOUS NEXT
Tagged: #readonly #const
ADD COMMENT
Topic
Name
6+8 =