I know answer is probably no, but I would like to be sure, because it would save me a lot of trouble.
To explain:
I would like to have C++ CLI class that uses only .net containers and regular ints, doubles…
and I would like to be able to serialize that CLI class and deserialize it into a “same” class that is written in C#.
I know answer is probably no, but I would like to be sure, because
Share
Yes; you can use any .Net serialization mechanism.
(binary, XML, DataContract, …)
As long as you don’t use any unmanaged code, there is no fundamental difference between managed types written in C++/CLI and managed types written in C#.
Note that .Net binary serialization cannot operate between equivalent types; to use binary serialization, you would need to define the types in a library and reference the library from both projects.