C#: Enums in Interfaces

前端 未结 5 639
有刺的猬
有刺的猬 2021-02-07 05:58

I\'ve seen a couple similar threads to this question, but none of them really answer the question I want to ask.

For starters, unfortunately I\'m working with existing A

5条回答
  •  遥遥无期
    2021-02-07 06:52

    The inability to write public interface IError where T: enum is something that we have all complained about for years. So far there has been no progress on that.

    I usually end up writing public interface IError and leaving a note for the implementor that T must be an enum.

提交回复
热议问题