- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ulong type in C#
The Ulong type in C# is an alias to the System.UInt64 type. It is an Unsigned integer.
Set the Ulong type −
ulong val = 7712059531;
To get the minimum and maximum value for Ulong type −
Console.WriteLine(ulong.MaxValue); Console.WriteLine(ulong.MinValue);
Here is the complete code −
Example
using System; using System.Threading; using System.Diagnostics; public class Demo { public static void Main() { ulong val = 7712059531; Console.WriteLine(val); // Max and Min values Console.WriteLine(ulong.MaxValue); Console.WriteLine(ulong.MinValue); // typeof Console.WriteLine(typeof(ulong)); } }
Output
7712059531 18446744073709551615 0 System.UInt64
Advertisements