Update of /cvsroot/nullabletypes/NullableTypes/src/Types
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8394/src/Types
Modified Files:
NullableDateTime.cs
Log Message:
Add new constructor to NullableDateTime that takes a long for ticks as per System.DateTime. Include appropriate constructor test.
Index: NullableDateTime.cs
===================================================================
RCS file: /cvsroot/nullabletypes/NullableTypes/src/Types/NullableDateTime.cs,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** NullableDateTime.cs 23 Sep 2005 12:06:22 -0000 1.22
--- NullableDateTime.cs 7 Nov 2005 13:22:39 -0000 1.23
***************
*** 29,32 ****
--- 29,33 ----
// 23-Sep-2005 DamienG Change Change the .Add method to return a new NullableDateTime structure and not
// modify this one, as is consistent with DateTime.
+ // 07-Nov-2005 DamienG Upgrade Add missing long ticks constructor.
//
***************
*** 130,133 ****
--- 131,144 ----
/// <summary>
+ /// Initializes a new instance of the DateTime structure with a given number of ticks.
+ /// </summary>
+ /// <param name="ticks">Number of ticks.</param>
+ public NullableDateTime(long ticks)
+ {
+ _value = new sys.DateTime(ticks);
+ _notNull = true;
+ }
+
+ /// <summary>
/// Initializes a new instance of the DateTime structure to the specified year, month, and day.
/// </summary>
|