I have a class that has a dateTime nullable variable called EndDate and when i call that variable , I want to add an extra minute in the time that is coming from the frontEnd, but I can't call the method that adds minutes to the DateTime type
This is what I would like to do, but as I said, I cannot call the AddMinutes method
Calendar calendar = new Calendar();
calendar.EndDate = calendar.EndDate.AddMinutes(1);
But it fails with:
CS1061 'DateTime?' does not contain a definition for 'AddMinutes' and no extension method 'AddMinutes' accepting a first argument of type 'DateTime?' could be found