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

namespace B1
{
    class Program
    {
        static void Main(string[] args)
        {
            TestKlasse k1 = new TestKlasse();
            k1.MyProperty = 5;
            Console.WriteLine(k1.MyProperty);
            k1[0] = 1;
            Console.WriteLine(k1[0]);
            Console.ReadLine();
        }
    }

    class TestKlasse
    {
        private int myProperty;
        public int MyProperty
        {
            get { return myProperty; }
            set { myProperty = value; }
        }

        private int[] arr;
        public int this[int i]
        {
            get { return arr[i]; }
            set { arr[i] = value; }
        }

        public TestKlasse()
        {
            arr = new int[5];
        }
    }
}
