c# - How To Check Deadline Of a Task in Wpf Application? -
i have wpf application in application want check deadline of task without simultaneously checking of database .
example - have assign 5 hrs task. want check deadline of task 5 hrs complete or not ?
how perform condition ?
i'm assuming task object has at least 2 properties - duration , starttime.
without these 2 properties don't see possible how determine if task instance should or should not completed yet.
also, duration should of type timespan.
now,
task _task = ... // task instance bool ispasttaskdeadline = (datetime.now - _task.starttime) > _task.duration;
Comments
Post a Comment