Enumerator Implementation: Use struct or class?

前端 未结 8 2644
再見小時候
再見小時候 2021-02-19 17:44

I noticed that List defines its enumerator as a struct, while ArrayList defines its enumerator as a class. What\'s t

8条回答
  •  情话喂你
    2021-02-19 18:10

    There's a couple of blog posts that cover exactly this issue. Basically, enumerator structs are a really really bad idea...

提交回复
热议问题