It’s the most wonderful time of the year

Here's a little holiday cheer for you all. Or, at least for you all in Commonwealth countries.

static object M<T>(T t) where T : struct
  return t;

int ii = 10;
int? jj = 20;
object xx = ii;
object yy = jj;
System.ValueType zz = ii;
IComparable aa = ii;
System.Enum bb = MidpointRounding.ToEven;
object cc = M(ii);

I hope you're having a festive holiday season. Happy Boxing Day, and we'll see you in the New Year for more fabulous adventures!

[Eric is on vacation; this posting is pre-recorded.]

Comments (7)
  1. Blake says:

    Too cute – Happy Boxing Day all.

  2. Blake says:

    And, for the record, if asked to list statements that would cause boxing I’d have certainly missed the assignments to ValueType and Enum.  Subtle.

  3. bettingdudebob says:

    Merry x’mas to all who post here…

  4. Michael says:

    *smacks forehead*

    …boxing…day…  duh…

  5. Angela says:

    I am sorry.. but I don’t understand… is there any special/cute meaning of these codes other than boxing?

    Nope. The joke is that it was “Boxing Day” on the 26th, so I figured that some boxing conversions would be festive. 

    Remember, the function of my sense of humour is to amuse *me*, not *you*.

    — Eric


  6. *groan*!

    I’m ashamed to admit that despite being British by birth and upbringing I still didn’t get it even *after* Blake’s spoiler for a good minute or two. “Subtle” is an understatement 🙂

    Well played.


  7. Voo says:

    And I was still trying to figure out what the heck a "Boxing day" is..  we poor continental europeans 😉

Comments are closed.

Skip to main content