I have a service layer structure works on Java without any error. But when I try it on C# it's not working as I expected. I have a common service interface IService which has a method Update that returns another interface IUpdateResult. And I have a custom service interface IAService like below.
public interface IService
{
IUpdateResult Update();
}
public interface IAService : IService
{
}
And finally I have a UpdateResult class which implements IUpdateResult.
public class UpdateResult : IUpdateResult
{
}
I am implementing custom service class like below and it does not allow me to do this.
public class AService : IAService
{
public UpdateResult Update()
{
// bla bla
}
}
As I mentioned it's working on Java the way I want. Why does C# give me error?