如何判断一年中的某一天是否已经过去?

How to tell if a particular day of the year has already passed?

我有一个 TextBlock,我想检查 phone 的日期。 例如:"If passed April 10, displays a string, or do other .." class DateTime?

存在这种可能性

如果我没看错你的问题,你应该可以这样做:

if (DateTime.Today > yourTestDate)
{
    //do stuff.
}

使用 DateTime.TryParse 将您希望查询的日期解析为 DateTime 对象,然后使用 DateTime.Now.Subtract 减去该日期。如果您在任何属性(如秒数)中获得正数,则日期已过。负数表示在未来