0

我的 json 数组:

   {" lstFooddtlResult":[{"class_name":"Veg","food_name":"pizza","food_photo":[255,216,255,224,0,16,74,70,73,70,0,1........],"food":"12","qty_uom":"Pcs","unit":null}]}

C#类:

public class Food{
    public string class_name { get; set; }
    public string food_name { get; set; }
    public photo[] photo { get; set; }
    public int food { get; set; }
    public string qty_uom { get; set; }
    public string unitcost { get; set; }

}

    public class photo{
    public byte food_photo { get; set; }
}

    public class FooddtlResult{
    public Food[] lstFooddtlResult { get; set; }
}

我的问题是:

  1. 我的 c# 类是正确的吗?

  2. 如何在 c# asp.net 中将字节数组转换为图像?

4

0 回答 0