我正在将用C++编写的库翻译成C#,关键字"union"只存在一次.在结构中.
将它翻译成C#的正确方法是什么?它做了什么?它看起来像这样;
struct Foo { float bar; union { int killroy; float fubar; } as; }
c# c++ unions
c# ×1
c++ ×1
unions ×1