what is read only and constant

Answer Posted / payal mehta

A constant value must be initialized at the time of
declaration
and this value cannot be changed anywhere in the program.

A Read-only value can be assigned any time but it
should not be modified anywhere in the program.we can only
view not edit its value.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between float and decimal?

503


What is the main usage of keyword “virtual” ? How does it work for a method or property?

515


What is the difference between list and arraylist c#?

518


What do you mean by jagged arrays in c#?

476


Explain the role of Garbage collector and its generations?

516






What are the 4 pillars of any object oriented programming language?

446


What is dto c#?

479


Is array reference type in c#?

484


What is foreach loop in c#?

525


how to print invert pyramid in c#

1307


Why do we use 0?

501


Can you instantiate a struct without using a new operator in c#?

530


How do you declare a variable in c#?

513


What is type safe in c#?

485


What is difference between association, aggregation and inheritance relationships?

492