Home > Net >  Their similar ToDictionary extension method, how to deal with layers of the Dictionary
Their similar ToDictionary extension method, how to deal with layers of the Dictionary

Time:04-21


Himself wrote a SerializableDictionary can be serialized to XML, inherited from Dcitionary,
Write an extension method of converting the Dictionary SerializableDictionary, but can only convert a layer of a Dictionary,
If it is a similar Dictionary So that even more layers of two layers, how to write conversion? (I have to deal with the data up to four layer Dictionary)


Before the idea is to determine the kv. The type of the Value, but because is a generic method, kv. The Value is of type TValue to call ToSerializableDictionary

CodePudding user response:

Don't you want is the json
  •  Tags:  
  • C#
  • Related