

MCQOPTIONS
Saved Bookmarks
1. |
Which of the following is the correct way to implement the interface given below? interface IPerson { String FirstName { get; set; } } |
A. | <pre><code class="csharp">class Employee : IPerson { private String str; public String FirstName { get { return str; } set { str = value; } } }</code></pre> |
B. | <pre><code class="csharp">class Employee { private String str; public String IPerson.FirstName { get { return str; } set { str = value; } } }</code></pre> |
C. | <pre><code class="csharp">class Employee : implements IPerson { private String str; public String FirstName { get { return str; } set { str = value; } } }</code></pre> |
D. | None of the above |
Answer» B. <pre><code class="csharp">class Employee { private String str; public String IPerson.FirstName { get { return str; } set { str = value; } } }</code></pre> | |