Class declared inside of another class in C#

前端 未结 7 1145
庸人自扰
庸人自扰 2021-02-02 06:12

I am working on some legacy code and have come across something that I\'m not sure of. We have a class y that is declared inside of another class x.

7条回答
  •  梦毁少年i
    2021-02-02 06:44

    I think it's ok, as long as the contained class is only used as utility. I use this sort of construct for example to define complex return types for private methods.

提交回复
热议问题