How to convert decimal to long in C#

1 Answer

0 votes
using System;
					
public class Program
{
	public static void Main()
	{
		decimal d = 98213425.4278M;
		long l = Convert.ToInt64(d);
		
		Console.WriteLine(l);
	}
}




/*
run:

98213425

*/

 



answered Feb 12, 2021 by avibootz
...