c++ cli - Difference between "struct" and "value struct" -
what difference between
public struct x{ public: int a;}; and
public value struct x{ public: int a;}; how can convert 1 other?
the first normal c++ structure.
using value struct creates c++/cli value type (a .net structure). typically want copy 1 other manually, though if memory layout same, can use things marshal::ptrtostructure copy data directly. note returns boxed value struct, however, manual copying more efficient.
Comments
Post a Comment