jessewth's blog
2008/10/18
字串比對上的眉角
if
(e.Row.Cell[0].Text.Equals(
"mytest"
))
...
改成
if
(
"mytest"
.Equals(e.Row.Cell[0].Text))
...
可避免因為e.Row.Cell[0].Text如果是空值而造成程式exception.
‹
›
首頁
查看網路版