Int32 : Este Int32 -2147483648 a +2147483647
C#
// C# program to show the // difference between Int32 // and UInt32 using System; using System.Text; public class GFG { // Main Method static void Main(string[] args) { // printing minimum & maximum values Console.WriteLine("Minimum value of Int32: " + Int32.MinValue); Console.WriteLine("Maximum value of Int32: " + Int32.MaxValue); Console.WriteLine(); // Int32 array Int32[] arr1 = {-3, 0, 1, 3, 7}; foreach (Int32 i in arr1) { Console.WriteLine(i); } } }
Producción:
Minimum value of Int32: -2147483648 Maximum value of Int32: 2147483647 -3 0 1 3 7
UInt32 : Este UInt32 0 a 4294967295
C#
// C# program to show the // difference between Int32 // and UInt32 using System; using System.Text; public class GFG{ // Main Method static void Main(string[] args) { // printing minimum & maximum values Console.WriteLine("Minimum value of UInt32: " + UInt32.MinValue); Console.WriteLine("Maximum value of UInt32: " + UInt32.MaxValue); Console.WriteLine(); // Int32 array UInt32[] arr1 = { 13, 0, 1, 3, 7}; foreach (UInt32 i in arr1) { Console.WriteLine(i); } } }
Producción:
Minimum value of UInt32: 0 Maximum value of UInt32: 4294967295 13 0 1 3 7
Diferencias entre Int32 y UInt32 en C#
No Señor |
INT32 |
UINT32 |
1. |
Int32 | UInt32 |
2. |
Int32 | UInt32 |
3. |
||
4. |
||
5. |
TInt32 | El UInt32 va desde |
6. |
Sintaxis para declarar el Int32 : Int32 variable_name; |
Sintaxis para declarar el UInt32: UInt32 variable_name; |
Publicación traducida automáticamente
Artículo escrito por SHUBHAMSINGH10 y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA