i loop trought a DateTime,
while looping i get current element,
i need the precedent elemnet too!
the prob is that for the first element there's no precendent.
i dont want to test if it's first to avoid the IndexOutOfException to raise,
what can i do, if there's a possibility, in order to continue the process after the Exception was
throws, is there a way to get back to the try block with incrementing, the index, here 's my i variable?
i add the code,
all infos are welcome.
thanks in advance.
private ArrayList GetDrainsObj(DateTime aDrainDateList)
Drain _tempDrain = null;
ArrayList _allDrains = new ArrayList();
int index = 0;
for (int i = 1; i < aDrainDateList.Length; i++ )
DateTime current_drain = aDrainDateList[index];
DateTime last_drain = aDrainDateList[index-1];
_tempDrain = new Drain(id_, Ecolog_.Id_int, current_drain, last_drain, DateTime.Now);