мне нужно преобразовать число с плавающей запятой в 2 десятичных format.I попытались Math.round(AmountSpent1,2)
Это мой код:Как округлить значение float до 2 знаков после запятой?
float AmountSpent1 = float.Parse(FixedAmount);
Math.Round(AmountSpent1, 2);
Смотрите ответ здесь: http://stackoverflow.com/questions/441600/write-a-number-with-two-decimal-places-sql-server – Phil