I declared a variable named date
with type DateTime
in Visual Studio 2017 but when I try to access DateTime::DayOfWeek
, I cannot do so. I was trying to give date
that value like this
DateTime dayy;
dayy = DateTime::DayOfWeek;
But I get error
A nonstatic member reference must be relative to a specific object