JObject pcount = new JObject();
int numTotal = 0;
IEnumerable<JProperty> properties = pcount.Properties();
foreach (JProperty item in properties)
{
numTotal += int.Parse(item.Value.ToString());
// item.Name 为 键
// item.Value 为 值
}
C#:遍历JObject
原创
©著作权归作者所有:来自51CTO博客作者KaiSarH的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
C#:JObject、JArray、JProperty、JValue作用
C#中JObject、JArray、JProperty、JValue作用
json对象 json数据 jar C -
C# 遍历 HTML元素 遍历html控件
C# 遍历 HTML元素 遍历html控件
C# 休闲 遍历 HTML元素 遍历html控件 -
C# 遍历枚举
本文告诉大家如何遍历枚举遍历枚举是很简单,请...
.net 商业 性能比较 枚举类型 C语言 -
C#遍历Dictionary
C#遍历Dictionary方法 推荐:://..com/roucheng/p/3521864.html
.net C# c# html jquery -
C# 字典 Dictionary 遍历
转自原文 C# 字典 Dictionary 遍历
C# 语法 泛型 c# 删除元素 c