I have the following class
using System;
using System.Globalization;
namespace GenericSomething
{
public class Specific : Generic
{
public override bool DoSomething(string date)
{
DateTime newDate = DateTime.ParseExact(date, "yyyyMMdd", CultureInfo.InvariantCulture);
if (newDate.Date == DateTime.Now.Date)
return true;
else
return false;
}
}
}
When I debug and I use the "Add Clock" in DateTime.Now.Date, I get
"DateTime does not exist in the current context."
And the condition is never fulfilled, even if the dates match.
Why am I turning on System?
source
share