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

What is difference between Viewbag and Viewdata in ASP.NET MVC?

827


What is Area in ASP.Net MVC?

863


What are action filters?

813


Explain Model, view and Controllers in Asp.Net MVC?

810


What is managed extensibility framework?

783


What is orm entity framework?

758


What is .net framework & its benefits?

775


How to use multiple submit buttons in asp.net mvc?

852


How to enable Attribute Routing?

877


Give an example for authorization filters in an asp.net mvc application?

779


How route table has been created in asp.net mvc?

776


Explain the types of Scaffoldings.

866


What is objectcontext? : Entity framework

870


What are Scaffold templates in ASP.Net MVC?

803


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

831