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
Post a Comment