![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
Convert.ToUInt64 Method in C#
Use the Convert.ToUInt64() method to convert a specified value to a 64-bit unsigned integer.
The following is our char.
char ch = 'a';
Now, let’s convert it to a 64-bit unsigned integer.
ulong res; res = Convert.ToUInt64(ch);
Here is the complete example.
Example
using System; public class Demo { public static void Main() { char ch = 'a'; ulong res; res = Convert.ToUInt64(ch); Console.WriteLine("Converted char value '{0}' to {1}", ch, res); } }
Output
Converted char value 'a' to 97
Advertisements