What does readonly mean in c#?



What does readonly mean in c#?..

Answer / Nikesh Gupta

In C#, the readonly modifier indicates that a field cannot be assigned a value more than once after its declaration. It can only be initialized at declaration or through a constructor.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is the base class from which all value types are derived?

1 Answers  


What is an int c#?

1 Answers  


What is a method c#?

1 Answers  


What is predicate builder?

1 Answers  


About multi level and multiple inheritance how to achieve in .net ?

2 Answers   CTS, MMTS,


Can list contain duplicates c#?

1 Answers  


What are data types with examples?

1 Answers  


Constructor to an arbitrary base constructor?

1 Answers  


Where test director stores its data ? Database ,Local file etc...? I need to read this data from Visual Studio 2005 c# client. Regards

1 Answers  


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

1 Answers  


When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)?

2 Answers   Mind Tree,


Can we have only “try” block without “catch” block in c#?

1 Answers  


Categories