Now let us how C# compile works for peoperties
Step :1 Open IDE and choose console application1 and save

Modify the codes

 using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
    class team
    {
        private string m_name = "N/A";
        private int m_uniform = 0;
        //
        public team() { Console.WriteLine("constructor evoked "); }
        ~team() { Console.WriteLine("destructor evoked "); }
        // Declare a Name property of type string:
        public string Name
        {
            get
            {
                return m_name;
            }
            set
            {
                m_name = value;
            }
        }

        // Declare an uniform property of type int:
        public int uniform
        {
            get
            {
                Console.WriteLine("Uniform Property get accessed ");
                return m_uniform;
            }

            set
            {
                Console.WriteLine("Uniform Property set processed ");
                m_uniform = value;
            }
        }

        public override string ToString()
        {
            return "Name = " + Name + ", uniform = " + uniform;
        }
    }

    class Test
    {
        static void Main()
        {
            // Create a new team object:
            team player = new team();
            Console.Write("Enter player's name : ");
            string str1 = Console.ReadLine();
            Console.Write("Enter Uniform Number  : ");
            int n = int.Parse(Console.ReadLine());
            // Print out the name and the age associated with the player:
            System.Console.WriteLine("Local processes - {0}", player);

            // Set some values on the player object:
            player.Name = str1;
            player.uniform = n;
            System.Console.WriteLine("player's name and uniform : " + player);


        }
    }
}

   

 
Let us debug

 
How compiler flows?
The cursor enters the code at Main()

step 2 contd.

At this stage a blank console page will open.

An obeject is created when curosr moves to next line (PressF11). Note the follwoings
  • player is an instance of class team under the namespace "Consoleapplication1.team"
  • team is base object

step : press F11, cursor goes and checks all the members declared with the class team

 

.

At this point, since property is a reference type, the variable when accessed the compiler check the address of the variable and if you look at the command window at this point you will note that "get" property was read by the compiler.

Similar way when int m_uniform variable was instantiated, compiler checks the get or read property.
even when the compiler access constructor, the cursor checks with get/read  property of the class.

Traversing through constructors

console windows

After this point you may have to use break point at read line function, becuase while debugging during Console.ReadLine focus is shifted from console to coding pane of visual C#, and link
However if you press F% from C# express studio, it runs different from command line