How do I convert a dynamic object to a Dictionary in C# What can I do?
Dictionary
public static void MyMethod(object obj) { if (typ
I use this simple method:
public Dictionary objToDict(XYZ.ObjectCollection objs) { var dict = new Dictionary(); foreach (KeyValuePair each in objs){ dict.Add(each.Key, each.Value); } return dict; }