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

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -