Wednesday 27 July 2016

C Sharp This pointer tutorial

C# This pointer tutorial

class test
    {
        int x, y;
        public test(int x, int y)
        {
            this.x = x;
            this.y = y;

        }
        public void display()
        {
            Console.WriteLine(x);
            Console.WriteLine(y);
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            test ob = new test(5, 4);
            ob.display();
        }
    }

No comments:

Post a Comment