things that make you go hmm (part 2)

February 27, 2009 § Leave a comment

I stared at this for probably 5 minutes straight in an attempt to figure out what I was missing.

public int Compare(PropertyBag p1, PropertyBag p2)
{
 
    int retval = p1.NavigateOrder.CompareTo(p2.NavigateOrder);
    if (retval != 0)
    {
        //if the navigate orders are not equal, the higher is later
        return retval;
    }
    else
    {
        //if the navigate orders are equal, sort them together
        return p1.NavigateOrder.CompareTo(p2.NavigateOrder);
    }
 
}//End Compare
Advertisements

Tagged: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading things that make you go hmm (part 2) at Mike Vallotton's Blog.

meta

%d bloggers like this: