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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maha
NA
600
70.9k
Properties and execution bar
Oct 20 2014 4:51 AM
In property programming method, when we use Step Into (F11) key for debugging, execution bar is completing its task within Main() method without going to the class like traditional method. Please explain the reason for that.
using System;
public class CreateStudent
{
public static void Main()
{
Student oneSophomore = new Student();
oneSophomore.Id = 951;
oneSophomore.Name = "Ross";
oneSophomore.GPA = 3.5;
Console.WriteLine
("The student named {0} has ID # is {1} and a gpa of {2}",
oneSophomore.Name, oneSophomore.Id, oneSophomore.GPA);
Console.Read();
}
}
class Student
{
private int idNumber;
private string lastName;
private double gradePointAverage;
public int Id
{
get { return idNumber; }
set { idNumber = value; }
}
public string Name
{
get { return lastName; }
set { lastName = value; }
}
public double GPA
{
get { return gradePointAverage; }
set { gradePointAverage = value; }
}
}
//The student named Ross has ID # is 951 and a gpa of 3.5
Reply
Answers (
10
)
How to generate image in ppt
Regular Expression for string formation