代码如下,请各位知道的,帮忙说下什么错了,谢谢
public Image ReadImage(byte[] bytes)
{
    MemoryStream ms=new MemoryStream(bytes,0,bytes.Length);
    BinaryFormatter bf = new BinaryFormatter();
    object obj=bf.Deserialize(ms);   
  ms.Close(); 
  return (Image)obj;
}
//图片加载
private void ReadPicture(string FoodCode)
{
     try

//读取图象
string ls_sql="select FoodPicture from FoodDetails where     FoodCode='"+FoodCode+"'";
SqlConnection conn=new SqlConnection  (System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]);
conn.Open();
this.pictureBox1.Image=null;
this.pictureBox1.Refresh();
SqlCommand cmd=new SqlCommand(ls_sql,conn);
SqlDataReader reader=cmd.ExecuteReader();
while(reader.Read())
{
   if(reader.IsDBNull(1))
{
byte[] b = (byte[])reader["FoodPicture"];
this.pictureBox1.Image=this.ReadImage(b);}
                    
}
reader.Close();
conn.Close();
   }
   catch(Exception ex)
  {
     MessageBox.Show(ex.Message);
  }
运行的报错说:索引超出数组了,不知道是什么原因,还请各位帮忙看看