Q:

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

I have a problem with designing my interfaces
I have these interfaces :
interface IField {

}

interface IScreenField : IField {

}

interface ITable { 
    CustomCollection<IField> CustomCollection { get; set; }
}

interface IScreen
{
    AnotherCustomCollection<IScreenField> AnotherCustomCollection { get; set; }
}

IScreen interface should inherit from ITable 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<IField>
Here is the sample : 
Sample project

A:

This is the answer I posted on your previous post. Reposting it here as-is since your previous question was put on hold before I could
  submit the answer.

It’s very difficult to identify the problem without looking at the full code but based on what you have said, I believe, you have implemented IScreenField explicitly and the compiler is not able to find any implementation of IField. 
Checkout following for more info: 
https://www.codeproject.com/Articles/1000374/Explicit-Interface-VS-Implicit-Interface-in-Csharp
Update: After looking at the code
First of all you need to understand difference between Implicit and Explicit implementations of an Interface:

Implicit: you access the interface properties and properties as if they were part of the class.
  Explicit: you can only access properties and properties when treating the class as the implemented interface.

The problem with the Screen class is that it implements IScreen interface, which in-turn implements ITable interface. Both these interfaces have a property named Fields. 
The problem surfaced due to this and you are required to 
explicitly implement the Fields property in Screen class. 
NOTE: It is irrelevant that you have different return types. Since you have implemented Fields property in both interfaces, it is assumed that you are expecting different values when the property is accessed from each of the interfaces. 
public class Screen : IScreen
{
    public string Name { get; set; }

    AnotherCustomCollection<IBaseField> IScreen.Fields
    {
        get
        {
            return default(AnotherCustomCollection<IBaseField>);
        }
    }

    CustomCollection<IField> ITable.Fields
    {
        get
        {
            return default(CustomCollection<IField>);
        }
    }

    public string Title { get; set; }
    public string Description { get; set; }
}

Now how to access them? To access Fields property of each of these Interfaces you need to access Screen object as those interfaces. 

Ex:
var screen = new Screen();
var fields = screen.Fields; // Error
var fields = (screen as IScreen).Fields; // returns property value of IScreen Fields
var fields = (screen as ITable).Fields; // returns property value of ITable Fields

Here is the complete code: https://dotnetfiddle.net/5KS0Xd
Hope this was helpful. All the best and happy coding. 

