Question:Choose the right Syntax-- 

A 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 

+ Answer
+ Report
Total Preview: 707

Copyright © 2024. Powered by Intellect Software Ltd