How to access members of an struct like an array in C#?

前端 未结 5 1220
余生分开走
余生分开走 2021-01-26 16:16

Lets say I have a struct with more than hundred elements with complex names. And I am passing a struct of the struct type described to a function using ref, like this:



        
5条回答
  •  無奈伤痛
    2021-01-26 17:02

    Maybe you should re-examine your choice of data structure. Perhaps a dictionary would be better suited?

提交回复
热议问题