Hi Everyone,
Displaying floating-point number as a percentage with round percentage using c#.
double ratio = 93712052291.82;
double ratio = 93712052291.82;
I need result 99.05% from ratio as a percentage with round value.


Shakti Singh DulawatRank #668 · 3.6K reputationPosted Apr 19, 2016, 11:54 PM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Apr 20, 2016, 12:37 AM EDT
I have input =93712052291.82;
I want output = 99.05%;
Shakti Singh DulawatRank #668 · 3.6K reputationPosted Apr 20, 2016, 1:03 AM EDT
double number = .2468013; Console.WriteLine(number.ToString("P", CultureInfo.InvariantCulture)); // Displays 24.68 % Console.WriteLine(number.ToString("P", CultureInfo.CreateSpecificCulture("hr-HR"))); // Displays 24,68% Console.WriteLine(number.ToString("P1", CultureInfo.InvariantCulture)); // Displays 24.7 %Abhilash J ARank #1,243 · 1.4K reputationPosted Apr 20, 2016, 2:23 AM EDT
How can do?
Shakti Singh DulawatRank #668 · 3.6K reputationPosted Apr 20, 2016, 2:46 AM EDT