Top "Readonly" questions

Read-only is a generic concept that means "not writeable" - Please DO NOT USE THIS TAG.

Which is better between a readonly modifier and a private setter?

I've been working on creating a class and suddenly a thought came to my mind of what is the difference …

c# readonly private-members
Assigning a value to an inherited readonly field?

So I have a base class that has many children. This base class defines some readonly properties and variables that …

c# inheritance constructor readonly
Why does a read-only textbox not return any data in ASP.NET?

I've set a textbox to read-only. When the user clicks on it, a calendar is displayed and the user selects …

asp.net textbox readonly
How can I enable jquery validation on readonly fields?

Guys from http://jqueryvalidation.org/ just released version 1.13.1. Checking on their website i see this on the changelog: CORE: * Ignore …

jquery datepicker jquery-validate readonly
How is read-only memory implemented in C?

I heard that in C, if I do char *s = "hello world". the "hello world" is actually stored in read-only …

c memory readonly
Create a read-only file

I was wondering wether it is possible to create or simulate a file with a content set at creation and …

java file protection readonly
Why can't I initialize readonly variables in a initializer?

Why can't I initialize readonly variables in a initializer? The following doesn't work as it should: class Foo { public readonly …

c# .net c#-3.0 initialization readonly
How can I make a Django model read-only?

Is it possible to make a Django model read only? No creating, updating etc. N.B. this question is different …

django django-models django-orm readonly
Static string literal table?

What is the correct way in C++ to create a global & static table of strings? By "global", I mean: …

c++ string static readonly string-table
assign value of readonly variable in private method called only by constructors

C# compiler gave me the following error CS0191: A readonly field cannot be assigned to (except in a constructor or …

c# readonly private-methods