小编G. *_*ain的帖子

如何将json字符串反序列化为c#dot中的对象列表

我正在使用以下JSON字符串

{
"transactions": 
[
   {
    "paymentcharge":"0.0",
    "amount":352,
    "id":13418,
    "shippingcharge":35,
    "shippingtype":2,
    "status":2,
    "paymenttype":1,
    "date":"2012-10-06 16:15:28.0"
   },   
   {
    "paymentcharge":"0.0",
    "amount":42455,
    "id":16305,
    "shippingcharge":0,
    "shippingtype":2,
    "status":2,
    "paymenttype":2,
    "date":"2012-11-30 09:29:29.0"
   },   
   {
    "paymentcharge":"1.0",
    "amount":42456,
    "id":16305,
    "shippingcharge":0,
    "shippingtype":2,
    "status":2,
    "paymenttype":2,
    "date":"2012-11-30 09:29:29.0"
   }
],
"count":3
}
Run Code Online (Sandbox Code Playgroud)

我有一个类结构如下解析和感受json数据

class clsSalesTran
{
    public double paymentcharge { get; set; }
    public double amount { get; set; }
    public long id { get; set; }
    public int shippingcharge { get; set; }
    public int shippingtype { get; set; }
    public …
Run Code Online (Sandbox Code Playgroud)

.net c# json desktop-application

13
推荐指数
3
解决办法
5万
查看次数

如何根据角色获取用户?

如何从MembershipUserCollection中检索"客户"角色的用户?

asp.net asp.net-membership c#-3.0

6
推荐指数
1
解决办法
4235
查看次数

使用正则表达式验证手机号码

我需要验证手机号码.我的需要:

  1. 该号码可以以+8801或8801或01开头
  2. 下一个数字可以是1或5或6或7或8或9
  3. 然后有确切的8位数.

如何使用这个条件编写正则表达式?

我试过的手机号码

+8801811419556
01811419556
8801711419556
01611419556
8801511419556
Run Code Online (Sandbox Code Playgroud)

regex

6
推荐指数
1
解决办法
1万
查看次数