TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Implementation of Class in C#
Sandeep Kumar
Dec 21
2015
Code
876
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Class.rar
Class Person
String PName, PColor, PQualification, PDesignation;
Int PAge;
Public
void
Get()
{
Console.WriteLine(
"Enter the person's Name,Color,Qualification,Designation and Age "
);
This.Pname = Console.ReadLine();
This.PColor = Console.ReadLine();
This.PQualification = Console.ReadLine();
This.PDesignation = Console.ReadLine();
This.PAge = Convert.ToInt32(Console.ReadLine());
}
Public
void
Display()
{
Console.WriteLine(
"Person Name is :"
+ This.PName);
Console.WriteLine(
"Person Color is :"
+ This.PColor);
Console.WriteLine(
"Person Qualification is :"
+ This.PQualification);
Console.WriteLine(
"Person Designation is :"
+ This.PDesignation);
Console.WriteLine(
"Person Age is :"
+ This.PAge);
}
Class ClassImpl
public
void
Main()
{
Person obj =
new
Person();
obj.Get();
obj.Display();
}
Console.Read();
}
Class Implementataion