Home > DeveloperSection > Forums > How to Implementation of Class in C#
Ankit Singh

Total Post:341

Posted on    December-21-2015 9:40 PM

 C# C#  .NET 

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

aditya kumar Patel

Total Post:253

Posted on    December-21-2015 9:46 PM

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();


Don't want to miss updates? Please click the below button!

Follow MindStick