📜  c# 对象到字典 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:19.407000             🧑  作者: Mango

代码示例1
public static Dictionary ToDictionary(object obj)
{       
    var json = JsonConvert.SerializeObject(obj);
    var dictionary = JsonConvert.DeserializeObject>(json);   
    return dictionary;
}