New to coding and C#. I've written a piece of code that I'm running into issues with rounding out to 2 decimals. My code is designed to take todays date and subtract it by a future date. The code itself works; but I wanted it to look cleaner than (Days until completion: 115.11560043243519). Below is my code:
Console.WriteLine("Newport to Owensboro:");
var currentDate = DateTime.Now;
var endDate = new DateTime(2022, 10, 30);
double remainingDays = endDate.Subtract(currentDate).TotalDays;
Console.WriteLine("Days until completion: {0}\n", remainingDays);
Math.Round(remainingDays, 2);