For Each dr As DataRow In drs2
If dr("上班打卡时间") > "09:30" AndAlso dr("上班打卡时间") < "09:45" Then
rin = t2.FindRow(dr)
If rin-1>0 Then '--------判断上一行数据
If t2.Rows(rin-1)("下班打卡时间") >"22:00" Then
drs2.Remove(dr)
End If
End If
End If
Next
蓝色位置报错了,应该如何修改呢
---------------------------
版本:2019.6.18.1
---------------------------
代码执行出错,错误信息:
System.InvalidOperationException: 集合已修改;可能无法执行枚举操作。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Collections.Generic.List`1.Enumerator.MoveNextRare()
在 System.Collections.Generic.List`1.Enumerator.MoveNext()
在 UserCode.Test()
---------------------------
确定
---------------------------