Get only direct interface instead of all?

前端 未结 6 2279
借酒劲吻你
借酒劲吻你 2020-12-17 09:43

I have a class like the below. GetInterfaces() says

If the current Type represents a type parameter in the definition of a generic type or generic

6条回答
  •  孤城傲影
    2020-12-17 10:20

    The same MSDN page says

    The GetInterfaces method does not return interfaces in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which interfaces are returned, because that order varies.

    So no, you can't skip interfaces.

提交回复
热议问题