Protogen generate List<int> instead of int array

这一生的挚爱 提交于 2021-02-10 16:50:58

问题


Protogen (langver=3) compiles

repeated int32 someInt;

To a int[]. Is there any way to force it to compile to System.Collections.Generic.List<int>?

Most other types (string, or custom types) compile to list. I can implement a workaround, but the cleanest solution for me would be if this could unpack my buffer to a List<int>


回答1:


Right now: no, not without editing some C#.

I have on my list adding the ability to choose list/lookup types for a range of reasons including this. I'll try to make sure this gets covered in that change.



来源:https://stackoverflow.com/questions/52770476/protogen-generate-listint-instead-of-int-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!