【问题处理】Unable to cast object of type ‘System.DBNull’ to type ‘System.String’.

  • Post author:
  • Post category:其他


问题


【.net报错】Unable to cast object of type ‘System.DBNull’ to type ‘System.String’.

解决

if (objOperation != System.DBNull.Value)
{
     e.Text = (string)objOperation;        
}



版权声明:本文为u011439689原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。