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

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -