Users Pricing

forum

home / developersection / forums / problem in get and set the data field

problem in get and set the data field

Anonymous User 3031 29 Jan 2011
we write this code but give the exception 
 class Program
    {
        static void Main(string[] args)
        {
            aa a = new aa();
            a.ff = 19;
        }
    }
    public class aa
    {
        int f1;
        public int ff
        {
            set
            {
                System.Console.WriteLine("in set " + value);
                f1 = value;
            }
        }
    }
what is the accurate solution of its?problem in get and set the data field

I am a content writter !


1 Answers