public static void PrintDate() => System.Console.WriteLine(Today.ToShortDateString());
public static void PrintDate() { WriteLine(Today.ToShortDateString()); }
public DateService() { if (System.IO.File.Exists(_currentDateFilePath)) { _currentDateFile = XDocument.Load(_currentDateFilePath); _currentDateElement = _currentDateFile.Descendants(_currentDateTagName).First(); Today = DateTime.Parse(_currentDateElement.Value); } else { Today = DateTime.Today; _currentDateFile = new XDocument(new XElement("SystemInfo", new XElement(_currentDateTagName, Today.ToShortDateString()))); _currentDateFile.Save(_currentDateFilePath); } }