interface does not work for me


hi, 

  please forgive me if ask beginner question. here code

  public interface idata    {      idata copy ();    }      ...    public class dataa : idata    {      public dataa copy ()      {        dataa mydataa = new dataa();        ...        return mydataa;      }    }  

  when compile, got error message, dataa.copy should return type idata. how implement properly? 

thank you, 

wes

 


wes

public idata copy () {...}

make return same type defined in interface, error message tells to.


Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user