What is the difference b/w constant & read only variable?

Answer Posted / test

Constant: The value of a constant variable is set at
compile time and can't be reset again.

Readonly: Can be set in a constructor or can be reset again.

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between razor and web form engine?

782


Does .NET Framework support SAX?

770


How to answer for project questions..?

2445


What are actions in asp.net mvc?

812


How can I return string result from action in asp.net mvc?

796


Explain tempdata in mvc?

752


How does the .net framework 3.0 relate to the .net framework 2.0?

800


What is entity framework firstordefault?

735


When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (xss) attacks?

967


What are Action Filters in ASP.NET MVC and its use?

819


What are the main components of .net framework?

769


what is model first approach?

816


Can you please explain the request flow in ASP.NET MVC framework?

858


What is the use of razor view engine?

733


Which is the default http method for an action method?

709