Q:

Is there a more efficient way to write IF statements that use DateTime values?

I have a hefty list of if statements which compare the current date to a set due date, it then displays how many days remain until the deadline or show if it has already been met. Just wondering if there is a more efficient way to go about this. 
Below is an example of one of the 'sets' of statements, there are around 7 more of these. It's almost kind of gross, looking for a little help or a point in the right direction in how I can tidy it up. Thanks!
if (DateTime.Now >= programming1)
{
    lblReadDate.Text = "Due date for Programming Assignment 1 has been reached (" + programming1.ToShortDateString() + ").";
}
else
{
    lblReadDate.Text = "Days remaining until Programming Assignment 1 deadline: " + daysRemaining1.ToString("0");
}

if (DateTime.Now >= programming2)
{
    lblReadDate2.Text = "Due date for Programming Assignment 2 has been reached (" + programming2.ToShortDateString() + ").";
}
else
{
    lblReadDate2.Text = "Days remaining until Programming Assignment 2 deadline: " + daysRemaining2.ToString("0");
}

A:

It's hard to tell what approach will work best for you, but I am presuming you will generally want to have a class that represents an assignment, e.g.:
public class Assignment
{
    public string Name { get; set; }
    public DateTime DueDate { get; set; }

    // This is just one of many ways to do it.
    // This can be an extension method, for example.
    // Note also that DateTime.UtcNow is changing as 
    // you are traversing the list.
    public bool IsOverdue
    {
       get { return DateTime.UtcNow > DueDate; }
    }
}

General way to associate two entities (in this case, an assignment instance and a label) would be through a Dictionary<TKey, TValue>. In this case you might map by assignment name, to keep things simple:
// This is just one of many ways to do it.
// You could make Assignment implement IEquatable, or
// specify a custom comparer and map from actual
// Assignment to a Label, for instance.
var assignmentToLabelMap = new Dictionary<string, Label>
{
    { "Programming Assignment 1", label1 },
    { "Programming Assignment 2", label2 },
    { "Programming Assignment 3", label3 }
}

Once you have this in place, your UI updates are simple:
// Get the assignments
IList<Assignment> assignments = GetTheListOfAssignments();

// Update labels
foreach (var assignment in assignments)
{
    // no error checking here whatsoever
    var label = assignmentToLabelMap[assignment.Name];

    if (assignment.IsOverdue)
        label.Text = xxx;
    else
        label.Text = yyy;
}

Since you seem to be using WinForms, you might also want to implement INotifyPropertyChanged and configure control binding to make all this happen automagically, but something still needs to iterate through the list at some time to trigger the change.

