hi
There is Some Value in database as 20.00(nvarchar)
When i get this value in c# Code it comes in string "20.05" up to here ok.when i try to convert this value to float it Shows 20.0
How i get it actuaal what is in database like 20.05
Hi droiddeve,
Refer the below code.
string a = "20.05"; float b = float.Parse(a, System.Globalization.CultureInfo.InvariantCulture.NumberFormat); // 20.05 OR double c = Convert.ToDouble(a); // 20.05
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.