381 references to Ticks
mscorlib (164)
system\datetime.cs (6)
241this.dateData = (UInt64)calendar.ToDateTime(year, month, day, hour, minute, second, 0).Ticks;
321Int64 ticks = calendar.ToDateTime(year, month, day, hour, minute, second, 0).Ticks;
355Int64 ticks = calendar.ToDateTime(year, month, day, hour, minute, second, 0).Ticks;
821Int64 ticks = Ticks;
1058long tick = utc.Ticks + offset;
1404long tick = Ticks + offset;
system\datetimeoffset.cs (15)
206return new DateTimeOffset((m_dateTime + offset).Ticks, offset);
217return new DateTime((m_dateTime + Offset).Ticks, DateTimeKind.Unspecified);
333return ClockDateTime.Ticks;
339return UtcDateTime.Ticks;
598return new DateTimeOffset(dateResult.Ticks, offset);
616return new DateTimeOffset(dateResult.Ticks, offset);
639return new DateTimeOffset(dateResult.Ticks, offset);
650return new DateTimeOffset(dateResult.Ticks, offset);
683long seconds = UtcDateTime.Ticks / TimeSpan.TicksPerSecond;
690long milliseconds = UtcDateTime.Ticks / TimeSpan.TicksPerMillisecond;
735result = new DateTimeOffset(dateResult.Ticks, offset);
748result = new DateTimeOffset(dateResult.Ticks, offset);
763result = new DateTimeOffset(dateResult.Ticks, offset);
778result = new DateTimeOffset(dateResult.Ticks, offset);
801Int64 utcTicks = dateTime.Ticks - offset.Ticks;
system\globalization\gregoriancalendarhelper.cs (18)
41this.ticks = new DateTime(startYear, startMonth, startDay).Ticks;
51this.ticks = new DateTime(startYear, startMonth, startDay).Ticks;
354if (ticks < m_Cal.MinSupportedDateTime.Ticks || ticks > m_Cal.MaxSupportedDateTime.Ticks) {
395CheckTicksRange(time.Ticks);
397int y = GetDatePart(time.Ticks, DatePartYear);
398int m = GetDatePart(time.Ticks, DatePartMonth);
399int d = GetDatePart(time.Ticks, DatePartDay);
418long ticks = DateToTicks(y, m, d) + (time.Ticks % TicksPerDay);
441return (GetDatePart(time.Ticks, DatePartDay));
451CheckTicksRange(time.Ticks);
452return ((DayOfWeek)((time.Ticks / TicksPerDay + 1) % 7));
460return (GetDatePart(time.Ticks, DatePartDayOfYear));
494long ticks = time.Ticks;
522return (GetDatePart(time.Ticks, DatePartMonth));
537long ticks = time.Ticks;
552long ticks = time.Ticks;
634CheckTicksRange(time.Ticks);
system\globalization\hebrewcalendar.cs (21)
299internal static readonly DateTime calendarMaxValue = new DateTime((new DateTime(2239, 9, 29, 23, 59, 59, 999)).Ticks + 9999);
441if (ticks < calendarMinValue.Ticks || ticks > calendarMaxValue.Ticks) {
668int y = GetDatePart(time.Ticks, DatePartYear);
669int m = GetDatePart(time.Ticks, DatePartMonth);
670int d = GetDatePart(time.Ticks, DatePartDay);
700return (new DateTime(ToDateTime(y, i, d, 0, 0, 0, 0).Ticks + (time.Ticks % TicksPerDay)));
724int y = GetDatePart(time.Ticks, DatePartYear);
725int m = GetDatePart(time.Ticks, DatePartMonth);
726int d = GetDatePart(time.Ticks, DatePartDay);
741long ticks = ToDateTime(y, m, d, 0, 0, 0, 0).Ticks + (time.Ticks % TicksPerDay);
751return (GetDatePart(time.Ticks, DatePartDay));
763return ((DayOfWeek)((int)(time.Ticks / TicksPerDay + 1) % 7));
801return ((int)((time.Ticks - beginOfYearDate.Ticks) / TicksPerDay) + 1);
858return (GetDatePart(time.Ticks, DatePartMonth));
872return (GetDatePart(time.Ticks, DatePartYear));
1009return (new DateTime(gregorianNewYear.Ticks + days * TicksPerDay
1021CheckTicksRange(dt.Ticks);
system\globalization\Persiancalendar.cs (13)
33internal static long PersianEpoch = new DateTime(622, 3, 22).Ticks / GregorianCalendar.TicksPerDay;
138if (ticks < minDate.Ticks || ticks > maxDate.Ticks) {
303int y = GetDatePart(time.Ticks, DatePartYear);
304int m = GetDatePart(time.Ticks, DatePartMonth);
305int d = GetDatePart(time.Ticks, DatePartDay);
318long ticks = GetAbsoluteDatePersian(y, m, d) * TicksPerDay + time.Ticks % TicksPerDay;
343return (GetDatePart(time.Ticks, DatePartDay));
354return ((DayOfWeek)((int)(time.Ticks / TicksPerDay + 1) % 7));
363return (GetDatePart(time.Ticks, DatePartDayOfYear));
403CheckTicksRange(time.Ticks);
421return (GetDatePart(time.Ticks, DatePartMonth));
441return (GetDatePart(time.Ticks, DatePartYear));
system\globalization\umalquracalendar.cs (14)
259internal static DateTime maxDate = new DateTime((new DateTime(2077, 11, 16, 23, 59, 59, 999)).Ticks + 9999);
381if (ticks < minDate.Ticks || ticks > maxDate.Ticks) {
432Contract.Assert((time.Ticks >= minDate.Ticks) && (time.Ticks <= maxDate.Ticks), "Gregorian date is out of range.");
437index = (int)((time.Ticks - minDate.Ticks) / Calendar.TicksPerDay) / 355;
487long ticks = time.Ticks;
560DateTime dt = new DateTime(GetAbsoluteDateUmAlQura(y, m, d) * TicksPerDay + time.Ticks % TicksPerDay);
561Calendar.CheckAddResult(dt.Ticks, MinSupportedDateTime, MaxSupportedDateTime);
596return ((DayOfWeek)((int)(time.Ticks / TicksPerDay + 1) % 7));
660CheckTicksRange(time.Ticks);
PresentationCore (3)
PresentationFramework (9)
System (6)
System.Activities (2)
System.Core (8)
System.Data (11)
System.Data.Entity (2)
System.Data.Entity.Design (1)
System.Data.Linq (4)
System.Data.Services (3)
System.Data.Services.Client (1)
System.Data.Services.Design (1)
System.Data.SqlXml (1)
System.IdentityModel (11)
System\IdentityModel\Tokens\SessionSecurityToken.cs (5)
753XmlUtil.WriteElementContentAsInt64(dicWriter, dictionary.EffectiveTime, dictionary.EmptyString, this.ValidFrom.ToUniversalTime().Ticks);
754XmlUtil.WriteElementContentAsInt64(dicWriter, dictionary.ExpiryTime, dictionary.EmptyString, this.ValidTo.ToUniversalTime().Ticks);
755XmlUtil.WriteElementContentAsInt64(dicWriter, dictionary.KeyEffectiveTime, dictionary.EmptyString, this.KeyEffectiveTime.ToUniversalTime().Ticks);
756XmlUtil.WriteElementContentAsInt64(dicWriter, dictionary.KeyExpiryTime, dictionary.EmptyString, this.KeyExpirationTime.ToUniversalTime().Ticks);
1062rnd = new Random(unchecked((int)DateTime.Now.Ticks));
System.Management (2)
System.Messaging (1)
System.Runtime.Caching (4)
System.Runtime.Serialization (8)
System.ServiceModel (13)
System\ServiceModel\Security\Tokens\SecurityContextCookieSerializer.cs (4)
185XmlHelper.WriteElementContentAsInt64(writer, dictionary.EffectiveTime, dictionary.EmptyString, tokenEffectiveTime.ToUniversalTime().Ticks);
186XmlHelper.WriteElementContentAsInt64(writer, dictionary.ExpiryTime, dictionary.EmptyString, tokenExpirationTime.ToUniversalTime().Ticks);
187XmlHelper.WriteElementContentAsInt64(writer, dictionary.KeyEffectiveTime, dictionary.EmptyString, keyEffectiveTime.ToUniversalTime().Ticks);
188XmlHelper.WriteElementContentAsInt64(writer, dictionary.KeyExpiryTime, dictionary.EmptyString, keyExpirationTime.ToUniversalTime().Ticks);
System.ServiceModel.Activities (1)
System.ServiceModel.Web (3)
System.Transactions (3)
System.Web (29)
System.Web.DataVisualization (1)
System.Web.Extensions (3)
System.Web.Mobile (7)
System.Web.Services (2)
System.Windows.Forms (50)
System.Windows.Forms.DataVisualization (1)
System.Xml (26)
System\Xml\BinaryXml\SqlUtils.cs (3)
978return (int)(dt.Ticks - new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second).Ticks);
982return (int)(dt.Ticks - new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second).Ticks);
System\Xml\Schema\XsdDateTime.cs (14)
315get { return (int)(dt.Ticks - new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second).Ticks); }
345return new DateTime(dt.Ticks, DateTimeKind.Utc);
348return new DateTime(dt.Subtract(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.Utc);
351return new DateTime(dt.Add(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.Utc);
399result = new DateTime(result.Ticks, DateTimeKind.Utc);
403ticks = result.Ticks - new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0).Ticks;
404if (ticks < DateTime.MinValue.Ticks)
408if (ticks < DateTime.MinValue.Ticks)
409ticks = DateTime.MinValue.Ticks;
416ticks = result.Ticks + new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0).Ticks;
417if (ticks > DateTime.MaxValue.Ticks)
421if (ticks > DateTime.MaxValue.Ticks)
422ticks = DateTime.MaxValue.Ticks;