Question: Choose the right Syntax--
A
B
C
D
public Class person
{
public FirstName {get; set;}
public LastName {get; set;}
}
person Alex= new person { FirstName= "Alex", LastName= "Mackey" };
B
public Class person
{
public string FirstName {get; set;}
public string LastName {get; set;}
}
person Alex= new person { FirstName= "Alex", LastName= "Mackey" };
C
public Class person
{
public FirstName {get, set}
public LastName {get, set}
}
person Alex= new person { FirstName= "Alex", LastName= "Mackey" };
D
none
Note: Not available