How to Implementation of Class in C#

Total Post:341

C#  .NET 
 642  View(s)
Rate this:
I Want to know How to Implementation of Class in C# please give me solution.

  1. Post:279

    Re: How to Implementation of Class in C#

    When you define a class, you define a blueprint for a data type. This does not actually define any data, but it does define what the class name means. That is, what an object of the class consists of and what operations can be performed on that object. Objects are instances of a class. The methods and variables that constitute a class are called members of the class.

    using System;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    class Employee
        String EName, EColor, EQualification, EDesignation;
        int EAge;
        public void Get()
            Console.WriteLine("Enter the Employee's Name,Color,Qualification,Designation and Age ");
            this.EName = Console.ReadLine();
            this.EColor = Console.ReadLine();
            this.EQualification = Console.ReadLine();
            this.EDesignation = Console.ReadLine();
            this.EAge = Convert.ToInt32(Console.ReadLine());
        public void Display()
            Console.WriteLine("Employee Name is  :" + this.EName);
            Console.WriteLine("Employee Color is  :" + this.EColor);
            Console.WriteLine("Employee Qualification is  :" + this.EQualification);
            Console.WriteLine("Employee Designation is  :" + this.EDesignation);
            Console.WriteLine("Employee Age is  :" + this.EAge);
    class ClassImpl
        static void Main(string[] args)
            Employee obj = new Employee();


      Modified On Apr-10-2018 06:43:44 AM



Enter your email address here always to be updated. We promise not to spam!