|
Cet article a fait l'objet d'une traduction manuelle. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte.
|
Traduction
Source
|
Convert.ToInt64, méthode (UInt32)
.NET Framework 4
Assembly : mscorlib (dans mscorlib.dll)
Paramètres
- value
- Type : System.UInt32
Entier non signé 32 bits à convertir.
uint[] numbers = { UInt32.MinValue, 121, 340, UInt32.MaxValue }; long result; foreach (uint number in numbers) { try { result = Convert.ToInt64(number); Console.WriteLine("Converted the {0} value {1} to the {2} value {3}.", number.GetType().Name, number, result.GetType().Name, result); } catch (OverflowException) { Console.WriteLine("The {0} value {1} is outside the range of the Int64 type.", number.GetType().Name, number); } } // The example displays the following output: // Converted the UInt32 value 0 to the Int64 value 0. // Converted the UInt32 value 121 to the Int64 value 121. // Converted the UInt32 value 340 to the Int64 value 340. // The UInt32 value 4294967295 is outside the range of the Int64 type.
Windows 7, Windows Vista SP1 ou ultérieur, Windows XP SP3, Windows XP SP2 Édition x64, Windows Server 2008 (installation minimale non prise en charge), Windows Server 2008 R2 (installation minimale prise en charge avec SP1 ou version ultérieure), Windows Server 2003 SP2
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.