Which of the following code defined an auto-implemented property correctly? clas
ID: 3580311 • Letter: W
Question
Which of the following code defined an auto-implemented property correctly?
class student
{
public string Name { get{}; set{}; }
}
class student
{
public string Name {}
}
class student
{
private string Name { get; set; }
}
class student
{
public string Name { get; set; }
}
class student
{
public string Name { get{}; set{}; }
}
class student
{
public string Name {}
}
class student
{
private string Name { get; set; }
}
class student
{
public string Name { get; set; }
}
Explanation / Answer
Answer :
Which of the following code defined an auto-implemented property correctly?
class student
{
public string Name { get{}; set{}; }
}
class student
{
public string Name {}
}
class student
{
private string Name { get; set; }
}
class student
{
public string Name { get; set; }
}
Answer:
class student
{
public string Name { get; set; }
}
Explanation :
Above code defined an auto-implemented property correctly.
................
class student
{
public string Name { get{}; set{}; }
}
class student
{
public string Name {}
}
class student
{
private string Name { get; set; }
}
class student
{
public string Name { get; set; }
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.