- 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
Implicit conversion from 64-bit signed integer (long) to Decimal in C#
The long type represents a 64-bit signed integer.
To implicitly convert a 64-bit signed integer to a Decimal, firstly set a long value.
long val = 989678876876876;
To convert long to decimal, assign the value.
dec = val;
Let us see another example −
Example
using System; public class Demo { public static void Main() { long val = 76755565656565; decimal dec; Console.WriteLine("Implicit conversion from 64-bit signed integer (long) to Decimal"); dec = val; Console.WriteLine("Decimal : "+dec); } }
Output
Implicit conversion from 64-bit signed integer (long) to Decimal Decimal : 76755565656565
Advertisements