三元运算符: txbMarketPrice.Text.Trim().Length == 0?0:Convert.ToDouble(txbMarketPrice.Text); 转载于:https://www.cnblogs.com/13306511495/archive/2005/12/13/296622.html