Wednesday 27 July 2016

C Sharp Properties Tutorial

C# Properties Program

 class test
    {
        int x;
        public int setX
        {
            get
            {
                return x;
            }
            set
            {

C Sharp String Tutorial

C# String Tutorial

 class Program
    {
        static void Main(string[] args)
        {
            String str;
            Console.Write("Enter your string>> ");
            str = Console.ReadLine();

C Sharp Function Overload

C# Function Overload

class test
{
        public void sum()
        {
            int a, b, c;
            Console.Write("Enter first number>> ");
            a = int.Parse(Console.ReadLine());
            Console.Write("Enter second number>> ");
            b = int.Parse(Console.ReadLine());
            c=a+b;
            Console.Write("\nA={0}\nB={1}\nSum={2}",a,b,c);
        }

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;