C# 无法将类型为“System.DBNull”的对象强制转换为类型“System.String”。

if (row["name"] != System.DBNull.Value)
{
   s_uname = (string)row["name"];
}


猜你喜欢

转载自blog.csdn.net/ychmj/article/details/9707885