whenever i try to serialize the dictionary i get the exception:
System.ArgumentException: Type
\'System.Collections.Generic.Dictionary`2[[Foo.DictionarySerializ
I think that you are having trouble because TestEnum
is declared as a private enum
. Try marking it as a public enum
. The serializer needs to be able to find your enum via reflection in order to serialize it.
Also according to the Docs, the enums must have integer values. So you might want to write:
public enum TestEnum { A = 1, B = 2, C =3 }
Also, the docs say that this enum will just get mapped to its corresponding integer value during the serialization. So depending on what you are doing on the other end, String
s might be more expressive and easier to work with.