mardi 21 août 2018

An issue with designing my interfaces in C# : Sample Project

I have a problem with designing my interfaces

I have these interfaces :

IField IScreenField //this interface inherit from IField

CustomCollection

AnotherCustomCollection

ITable //that contains CustomCollection IScreen //that contains AnotherCustomCollection

IScreen //interface should inherit from ITable interface but it shows an error that

I have to implement a collection of IField but I already implement a collection of IScreenField

what is the soltuion for this ?

I uploaded a sample project to explain the issue more

you can check the error message in Screen class that says :

'Screen' does not implement interface member 'ITable.Fields'. "Screen.Fields' cannot implement 'ITable.Fields' becuase it does not have the matching return type of 'CusomCollection

Here is the sample : Sample project

Aucun commentaire:

Enregistrer un commentaire