数据库查询为空时使用convert.isdbnull()判断

  if (!Convert.IsDBNull(dt.Rows[i]["roomId"]))
                {
                    pcInfo.RoomId = Convert.ToInt32(dt.Rows[i]["roomId"]);
                }

posted on 2012-09-18 11:18  静欲动  阅读(157)  评论(0编辑  收藏  举报

导航