首页 > 代码库 > C# BackJson Beautiful format

C# BackJson Beautiful format

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
public class ComBase
{
public string result { get; set; }
 
public ComBase(string data)
{
this.result = data;
}
}
 
public class ComRsp
{
public int code { get; set; }
public string msg { get; set; }
public ComBase data { get; set; }
 
public string BackJson(int code, string msg, string data)
{
this.code = code;
this.msg = msg;
this.data = http://www.mamicode.com/new ComBase(data);
return Common.EntityToJson(this);
}
}
 
 

C# BackJson Beautiful format