I just wonder if I do something like
for (int i = 0; i < dataTable.Rows.Count; i++)
Does array.Count get revaluated on each iteration?
The reason I ask is becuase if I delete rows from that datatable will that cause problems?
是的,它确实每次都会得到评估,但是您实际上不应该那样更改要迭代的元素的数量。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.