adplus-dvertising
frame-decoration

Question

Correct way to implement the interface given below?
interface abc
   {
       string name
       {
           get;
           set;
       }
   }

a)
   class emp :employee
   {
       private string str;
       public string firstname;
       {
           get
           {
               return str;
           }
           set
           {
               str = value;
           }
       }
   }

b)
  class emp :implements person
  {
      private string str;
      public string firstname
      {
          get
          {
              return str;
          }
          set
          {
              str = value;
          }
      }
  }

c)
 class emp: implements person
 {
     private string str;
     public string person.firstname
     {
         get
         {
             return str;
         }
         set
         {
             str = value;
         }
     }
 }

a.

a

b.

b

c.

c

d.

None of the mentioned

Posted under C# programming

Answer: (a).a

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Correct way to implement the interface given below?