✅ need quick help how to print 2 decimals
how can i print double numbers using {0:f2} in this case?
7 Replies
or any other way, i want to show "numbers are:" only once
arr[i].ToString("f2")
or Console.WriteLine(string.Format("{0:f2}", arr[i]));
so it must become a string?
Hover over WriteLine it's a method that requires a string, so you have to pass it a string, not a double, some methods might be overloaded (they have the same syntax but requires diffrent parameters) in case there is a overloaded method that can receive argument of your variable type, you don't have to parse
whoops lol
thank you!
Use the /close command to mark a forum thread as answered