UInt16 : este Int16 a 65535
C#
// C# program to show the // UInt16 struct using System; using System.Text; public class GFG{ // Main Method static void Main(string[] args) { //printing minimum & maximum values Console.WriteLine("Minimum value of UInt16: " + UInt16.MinValue); Console.WriteLine("Maximum value of UInt16: " + UInt16.MaxValue); Console.WriteLine(); // Int16 array UInt16[] arr1 = { 13, 0, 1, 3, 7}; foreach (UInt16 i in arr1) { Console.WriteLine(i); } } }
Producción:
Minimum value of UInt16: 0 Maximum value of UInt16: 65535 13 0 1 3 7
UInt32 : Este UInt32 0 a 4294967295
C#
// C# program to show the // UInt32 struct 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
UInt64 : Este UInt64 0 a
C#
// C# program to show the // UInt64 struct using System; using System.Text; public class GFG{ // Main Method static void Main(string[] args) { // printing minimum & maximum values Console.WriteLine("Minimum value of UInt64: " + UInt64.MinValue); Console.WriteLine("Maximum value of UInt64: " + UInt64.MaxValue); Console.WriteLine(); // Int64 array UInt64[] arr1 = { 13, 0, 1, 3, 7}; foreach (UInt64 i in arr1) { Console.WriteLine(i); } } }
Producción:
Minimum value of UInt64: 0 Maximum value of UInt64: 18446744073709551615 13 0 1 3 7
Diferencia entre UInt16, UInt32 y UInt64 en C#
No Señor |
UINT16 |
UINT32 |
UINT64 |
1. |
UInt16 | UInt32 | UInt64 64 |
2. |
UInt16 | UInt32 también | UInt64 también |
3. |
|||
4. |
|||
5. |
El UInt16 va desde | El UInt32 va desde | El UInt64 va desde |
6. |
Sintaxis para declarar el UInt16: UInt16 variable_name; |
Sintaxis para declarar el UInt32: UInt32 variable_name; |
Sintaxis para declarar el UInt64: UInt64 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