forum

Home / DeveloperSection / Forums / problem in get and set the data field

problem in get and set the data field

Anonymous User 2729 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

Updated on 20-May-2011
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By