I have the below script which shows following format as output:
67534 : 0.645623
64653 : 0.854261
95688112 : 0.7566438
When I test my script on another system, the format of the second column(the float numbers) changed to something like: 12.3E^12. When I change the number format from the control panel, the format becomes okay. What is the solution to fix the format of numbers in my code instead of changing the number format of the system (only for second column (resultwithindex.result))?
foreach (var resultwithindex in results.Select((r, index) => new { result = r, Index = index }).OrderByDescending(r => r.result).Take(n))
{
sb1.AppendFormat("{0}: {1}", c[resultwithindex.Index], resultwithindex.result);
sb1.AppendLine();
}
MessageBox.Show(sb1.ToString());
Thanks in advance