Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/returnsManagement/time
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23477/b4_Business/a2_Strategies/returnsManagement/time
Modified Files:
ReturnIntervals.cs
Log Message:
The read only property
public ReturnInterval LastInterval
has been added
Index: ReturnIntervals.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/returnsManagement/time/ReturnIntervals.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ReturnIntervals.cs 2 Mar 2008 14:52:26 -0000 1.7
--- ReturnIntervals.cs 27 Apr 2008 17:54:39 -0000 1.8
***************
*** 71,74 ****
--- 71,86 ----
}
}
+ public ReturnInterval LastInterval
+ {
+ get
+ {
+ if ( this.Count == 0 )
+ throw new Exception( "LastInterval " +
+ "cannot be used when ReturnIntervals has " +
+ "no ReturnInterval added yet!" );
+ ReturnInterval lastInterval = this[ this.Count - 1 ];
+ return lastInterval;
+ }
+ }
/// <summary>
/// The EndOfDayHistory made up by queuing all
|