What is difference between constants, readonly and, static

Answer Posted / kirti

Constants: The value can�t be changed

Read-only: The value will be initialized only once from the constructor of the class.

Static: Value can be initialized once.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to use multiple submit buttons in ASP.Net MVC?

866


Why should we go for entity framework?

753


Explain the advantages of asp.net mvc over asp.net?

845


Explain the role of assembly in the .net framework.

786


what is client wins and store wins mode in entity framework concurrency?

937


What is the .net framework 3.0 (formerly winfx)?

743


What symbol would you use to denote, the start of a code block in razor views?

768


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

843


what is model first approach?

816


What is the use of action filters in an mvc application?

873


What is ViewStart Page in ASP.Net MVC?

772


What happens when I install the .net framework 3.0? How can I upgrade if I already have the .net framework 2.0 installed?

759


What are the differences between Partial View and Display Template and Edit Templates in ASP.Net MVC?

815


what is entity framework?

821


What is the need of Action Filters in ASP.Net MVC

800