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 - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -