Are static members of a generic class tied to the specific instance?

后端 未结 6 1163
囚心锁ツ
囚心锁ツ 2020-12-02 15:16

This is more of a documentation than a real question. This does not seem to have been addressed on SO yet (unless I missed it), so here goes:

Imagine a generic class

6条回答
  •  情歌与酒
    2020-12-02 15:30

    They are not shared. Not sure where it's documented but analysis warning CA1000 (Do not declare static members on generic types) warns against just this due to the risk of making the code more complicated.

提交回复
热议问题