Read only member in a c sharp programming, It is represent a unchanging value, which like a constant value. But read only member can be initialized at run time, not a compile time . Its mean read only member are change only compile time, which is possible by constructor, and after compile you have no change the value of read only member. For example:
Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace dynamic_object_in_c_sharp
{
public class key //create class
{
readonly int x = 10; //define read only member value
public key() //create constructor
{
Console.WriteLine("Predefine
Readonly Member Value : {0}",x);
//Before compile read only value


Join the conversation! Your thoughts help the community grow.