Monday, 14 May 2018

This keyword in C#





 class Program

    {

        static void Main(string[] args)

        {

            employee EMP = new employee(12, 46000, "SALMAN");

            Console.ReadLine();

        }

    }



Model code:

    class employee

    {

        int id, salary;

        string name;

       public employee(int id,int salary,string name)

        {

            this.id = id;

            this.salary = salary;

            this.name = name;

            Console.WriteLine("ID: "+id);

            Console.WriteLine("NAME: "+name);

            Console.WriteLine("Salary: "+salary); 

       }

        

    }


No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...