What is the Difference between read only and constant
variables?

Answer Posted / parmjit

We can assign a value to a readonly variable at runtime
till it is a unassined identifier, but once value is
assigned, it cannot be changed.

In case of const we cannot assign a value at run time i.e.
the value assigned to it at declaration time cannot be
change

Is This Answer Correct ?    39 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain About Iunknown interface Queue

718


What is attribute and reflection in c#?

676


What does || mean in programming?

663


3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close

1618


What is interface inheritance in c#?

699


What does mean c#?

696


For read-only operation which property you have to designated?

814


When a switch is said to be congested?

756


Where do I put dll files?

751


Which string method is used for concatenation of two strings in c#?

687


What are the Configuration files in .net?

720


What is the C# syntax to catch any possible exception?

708


how can one use hcl and c sharp together?

1776


What is .dbml file?

676


What is the difference between private and protected in c#?

685