|
我想把把一些字符串填入开发助手生成的对象中,然后再生成json格式的字符串。
List<SiteInfo> list = new List<SiteInfo>();
list.Add(new SiteInfo() { Domain = "www.sufeinet.com", SiteName = "苏飞论坛", Stationmaster = "苏飞" });
list.Add(new SiteInfo() { Domain = "www.baidu.com", SiteName = "百度", Stationmaster = "李彦宏" });
list.Add(new SiteInfo() { Domain = "www.taobao.com", SiteName = "淘宝", Stationmaster = "马云" });
resultjson = HttpHelper.ObjectToJson(list);
上面这个例子中的Stationmaster 是一个字符串,我现在想把他替换成一个IList,我想请问这种情况下我应该如何设置变量?
例如我的格式是这样的
public IList<ValidProxyDetail> validProxyDetail { get; set; }
- public class ValidProxyDetail
- {
- public int proxyID { get; set; }
- public string proxyIP { get; set; }
- public int proxyPort { get; set; }
- public int proxyStatus { get; set; }
- public int proxyDely { get; set; }
- }
|
|