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