ACP*_*ACP 5 c# comparison reference
当我试图检查Session["userId"] != null为什么我收到此消息Possible unintended reference comparrison; to get value comparrison; cast left hand side to string任何建议....
Session["userId"] != null
Possible unintended reference comparrison; to get value comparrison; cast left hand side to string
slu*_*ter 8
Session[key]返回一个对象,而不是一个字符串 - 您应该将其强制转换为字符串,而不是依赖于隐式转换或ToString()功能.
Session[key]
归档时间:
15 年,6 月 前
查看次数:
7614 次
最近记录:
13 年,4 月 前