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,還有很多更多。 –