代码如下:

 public static Image BytesToImage(this byte[] bytes)
 {
        Image image = null;
        if (bytes != null)
        {
               using (MemoryStream  sm=new MemoryStream(bytes))
                {
                    image = Image.FromStream(sm);
                }
 
         }
            return image;
 }

问题在此:删除using, msdn

相关文章:

  • 2021-07-30
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-03-04
  • 2021-06-17
  • 2021-07-09
  • 2021-06-14
  • 2022-12-23
相关资源
相似解决方案