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

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'