Readonly Keyword in C#

Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 736
using System;
using System.Linq;
using System.Text;
using System.Collections;
using System.Data;
using System.Xml;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Threading;
namespace BlogProject
class StaticTest
public static readonly Int32 Value = 100;
class Program
static void Main(string[] args)
//It is not allowed to set data in read only variable
StaticTest.Value = 200; //It is Wrong

Comments or Responses

Login to post response