if (int.TryParse(strRasterID.split("-")[0], out leftIndex) &&
int.TryParse(strRasterID.split("-")[1], out bottomIndex))
求问这个if判断的是什么,小弟是做java的,先谢过各位大神
if (int.TryParse(strRasterID.split("-")[0], out leftIndex) &&
int.TryParse(strRasterID.split("-")[1], out bottomIndex))
求问这个if判断的是什么,小弟是做java的,先谢过各位大神
split将分割成数组
int.TryParse是尝试转换成int
strRasterID必须是 整数-整数(-xxxxxx) 的形式才是真
这样判断容易出问题的
如果strRasterID不包含 - 会抛 数组超限 异常