//
//
[StructLayout(LayoutKind.Auto)]
-#if FEATURE_SERIALIZATION
[Serializable]
-#endif
- public struct DateTime : IComparable, IFormattable, IConvertible, IComparable<DateTime>, IEquatable<DateTime>
-#if FEATURE_SERIALIZATION
- , ISerializable
-#endif
+ public struct DateTime : IComparable, IFormattable, IConvertible, IComparable<DateTime>, IEquatable<DateTime>, ISerializable
{
// Number of 100ns ticks per time unit
public static DateTime FromOADate(double d) {
return new DateTime(DoubleDateToTicks(d), DateTimeKind.Unspecified);
}
-
-#if FEATURE_SERIALIZATION
+
[System.Security.SecurityCritical /*auto-generated_required*/]
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) {
if (info==null) {
// Serialize both the old and the new format
info.AddValue(TicksField, InternalTicks);
info.AddValue(DateDataField, dateData);
- }
-#endif
+ }
public Boolean IsDaylightSavingTime() {
if (Kind == DateTimeKind.Utc) {