How to deep clone the Class that contains DynamicObject in C#?
public class DynamicDictionary : System.Dynamic.DynamicObject { Dictionary<string, object> dictionary = new Dictionary<string, object>(); public override bool TryGetMember(GetMemberBinder binder, out object result) { string name = binder.Name; return dictionary.TryGetValue(name, out result); } public override bool TrySetMember(SetMemberBinder binder, object value) { dictionary[binder.Name] = value; return true; } public override System.Collections.Generic.IEnumerable<string> GetDynamicMemberNames() { return this.dictionary?.Keys; } } public class SerializeExtensions { public string Name { get; set; } public DynamicDictionary DynamicObj { get; set; } } Please consider the above like my class. I have a List of SerializeExtensions collection. Now I have to deep clone this list of collections. This has been properly cloned when I am using the below code. JsonConvert.DeserializeObj...