在.net(c#)中,如何用response打印三元运算符结果
这样写不对啊 double discount; double dd = 15.2; discount = dd > 10 ? 0.8 : 0.9; response.write(discount);
这样写不对啊 double discount; double dd = 15.2; discount = dd > 10 ? 0.8 : 0.9; response.write(discount);
答案:Response.Write(discount.ToString());
Response.End();
其他:直接可以 respons.write( (dd >10? "0.8" :"0.9")) ;或者按你的写法是response.wriete(dicount.ToString()); Response.Write(discount.ToString());
小问题
上一个:.net 网站在根目录下动态生成目录(普通的文件夹,里面放ZIP压缩包) 会不会导致IIS重启?
下一个:求一简单的 DES加密实例。要c#.net实现!