- Jan 15, 2000
- 7,052
- 0
- 0
I have a struct declared in some C# code. This struct has it's own constructor to setup the various fields in the struct. I want to be able to call this constructor in Managed C++ code, but I keep getting the following error msg "Operator New allocates value types on the C++ heap, use '__nogc". When I use __nogc I get the following error msg "Cannot dynamically allocate this value type object on the native heap".
What can I do here guys? I can't set the fields manually either because I don't have direct access to them. You can only setup the fields via the constructor. Thanks.
What can I do here guys? I can't set the fields manually either because I don't have direct access to them. You can only setup the fields via the constructor. Thanks.
