How to implement a property in an interface

Viewed 232499

I have interface IResourcePolicy containing the property Version. I have to implement this property which contain value, the code written in other pages:

IResourcePolicy irp(instantiated interface)
irp.WrmVersion = "10.4";

How can I implement property version?

public interface IResourcePolicy
{
   string Version
      {
          get;
          set;
      }
}
6 Answers

You should use abstract class to initialize a property. You can't inititalize in Inteface .

Related