0
如何,如果减少的代码行数,这些类型的编码如何使用内联C#的,如果不是使用长C#的if语句
if (string.IsNullOrEmpty(txtpictext.Text))
{
Cmd.Parameters.AddWithValue("@pictext", DBNull.Value);
}
else
{
Cmd.Parameters.AddWithValue("@pictext, txtpictext.Text);
}
Conn.Open();
Cmd.ExecuteNonQuery();
所以你知道有一个*“内联c#如果”*,但它很难使用或什么? – Sinatr
重复https://stackoverflow.com/q/1678311/993547,还有很多更多。 –