using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Properties.Example33
{
    // Listing 3-33
    public class HasProperty
    {
        private int _x;
        public int X
        {
            get
            {
                return _x;
            }
            set
            {
                _x = value;
            }
        }
    } 

    class Demo
    {
        public static void UseProperty()
        {
            var o = new HasProperty();
            o.X = 42;
            Console.WriteLine(o.X);
        }
    }
}
