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 Peek method in Tempdata in ASP.Net MVC?

838


Is it possible to unit test an mvc application without running the controllers in an asp.net process?

860


What is MVVM design pattern?

836


Explain JSON Binding?

877


Is the following route definition a valid route definition? {controller}{action}/{id}

1025


Explain the 'page lifecycle' of an ASP.NET MVC?

881


Which is the root namespace for fundamental types in .net framework?

796


Does razor engine supports for tdd?

959


Mention some action filters which are used regularly in ASP.Net MVC?

790


What is managed extensibility framework?

779


What is display mode in mvc?

788


What is difference between viewbag and viewdata and tempdata?

784


What filters are executed in the end?

808


Is it possible to share a view across multiple controllers?

777


What are Code Blocks in Views?

895