How to declare a property in an Interface?

 Posted by SheoNarayan on 5/8/2008 | Category: C# Interview questions | Views: 12922
Answer:

DateTime DateOfBirth { get;set;}
int Age { get;set;}
string FirstName { get;set;}


As this is an Interface, so no implementation required only definition of properties are required. Implementation of these properties will be written into the class inherting this interface.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response