Explicit Casting Problem

后端 未结 3 1722
轻奢々
轻奢々 2020-12-04 04:22
// The Structure of the Container and the items
public interface IContainer  where TItem : IItem
{

}

public class AContainer : IContainer         


        
3条回答
  •  攒了一身酷
    2020-12-04 04:55

    If you want to use AContainer to be an IContainer, you need to implement this interface as well:

    public class AContainer : IContainer, IContainer
    

    You may implement it explicitly.

提交回复
热议问题