|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
DateTimeOffset.Ticks, propriété
Espace de noms : System
Assembly : mscorlib (dans mscorlib.dll)
Valeur de propriété
Type : System.Int64// Attempt to initialize date to number of ticks // in July 1, 2008 1:23:07. // // There are 10,000,000 100-nanosecond intervals in a second const long NSPerSecond = 10000000; long ticks; ticks = 7 * NSPerSecond; // Ticks in a 7 seconds ticks += 23 * 60 * NSPerSecond; // Ticks in 23 minutes ticks += 1 * 60 * 60 * NSPerSecond; // Ticks in 1 hour ticks += 60 * 60 * 24 * NSPerSecond; // Ticks in 1 day ticks += 181 * 60 * 60 * 24 * NSPerSecond; // Ticks in 6 months ticks += 2007 * 60 * 60 * 24 * 365L * NSPerSecond; // Ticks in 2007 years ticks += 486 * 60 * 60 * 24 * NSPerSecond; // Adjustment for leap years DateTimeOffset dto = new DateTimeOffset( ticks, DateTimeOffset.Now.Offset); Console.WriteLine("There are {0:n0} ticks in {1}.", dto.Ticks, dto.ToString());
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.