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

Related questions

2 answers 119 views
1 answer 151 views
151 views asked Feb 12, 2021 by avibootz
3 answers 176 views
176 views asked Feb 10, 2021 by avibootz
2 answers 392 views
392 views asked Feb 9, 2021 by avibootz
1 answer 166 views
166 views asked Feb 3, 2021 by avibootz
1 answer 123 views
123 views asked Aug 5, 2019 by avibootz
1 answer 126 views
126 views asked Aug 5, 2019 by avibootz
...