What is the difference between readonly and const

Answer Posted / vishnu

a read only
field can be initialized either in initialization or in
constructor

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by casting a data type?

712


Why do we use interfaces in c#?

723


What is the difference between finalize() and dispose()?

691


Why do we use yield in c#?

684


Is c sharp free?

725


What is the difference between c and c sharp?

725


Why we use delegates in c#?

697


Can extension methods access private members?

684


Is java better than c#?

690


If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?

708


Write a program in C# for checking a given number is PRIME or not.

866


What is constructor overloading in c#?

711


Does c# support multiple inheritance (mi)?

732


What is a decimal in c#?

713


What is the purpose of reserved word using in c#?

677