Decimal Value is 12568.521 When converting into float (float)Value
Value is coming as 12568.5215. I need exact value as 12568.521. Please anyone guide me.
Decimal Value is 12568.521 When converting into float (float)Value
Value is coming as 12568.5215. I need exact value as 12568.521. Please anyone guide me.
Try using Round in Math
decimal value = 12568.5215;
return Math.Round(value,3);
You may convert the decimal variable into a string:
decimal d = new decimal(12568.521);
float f = Single.Parse(d.ToString());