How to serialize named tuples (C#)?

in Help Center
Best Answer
-
xdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
Hi Mike,
Ice cannot directly send your named tuples, you have to use types defined in Slice, here you can probably use a couple of structs and sequences like in:
struct BenchmarkCount { long Data; // Send date as a long int Count; } sequence<BenchmarkCount> BenchmarkCountSeq; struct BenchmarkInfo { string Key; int Benchmark; BenchmarkCountSeq Counters; } sequence<BenchmarkInfo> BenchmarkInfoSeq;
1
Answers
Hi Mike,
Ice cannot directly send your named tuples, you have to use types defined in Slice, here you can probably use a couple of structs and sequences like in: