For i As Integer = 0 To _rows.Count
If (_rows(i).LeftOffset > largestOffset) Then
largestOffset = _rows(i).LeftOffset
End If
Next i
For i As Integer = 0 To _rows.Count
這段代碼從來沒有得到第二個,我可以把一個斷點放在結束如果在那裏,它觸發_rows.Count喜歡它應該,但如果有第二個斷點或任何之後它永遠不會到達。沒有錯誤消息,該程序不凍結或任何東西,它的行爲就好像我做了:Sub正在過早結束?
For i As Integer = 0 To _rows.Count
If (_rows(i).LeftOffset > largestOffset) Then
largestOffset = _rows(i).LeftOffset
End If
Next i
Return
For i As Integer = 0 To _rows.Count
你試過_rows.count -1?當你高於上限時,可能會拋出異常。 –