C#.NET 定义动态对象dynamic以及转换JSON字符串
C#.NET 定义动态对象dynamic以及转换JSON字符串
C# Code:
//定义动态对象转换JSON字符串
dynamic car = new
{
Name = "Audi A8L",
Model= " www.cscode.net:C/S框架网"
};
string js = JsonConvert.SerializeObject(car);
//JSON: {"Name":"Audi A8L","Model":" www.cscode.net:C/S框架网"}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
//定义动态对象转换JSON字符串
dynamic car = new
{
Name = "Audi A8L",
Model= " www.cscode.net:C/S框架网"
};
string js = JsonConvert.SerializeObject(car);
//JSON: {"Name":"Audi A8L","Model":" www.cscode.net:C/S框架网"}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网