Young Chuck moved to Montana and bought a horse from a farmer for $100. The farmer agreed to deliver the horse the next day.

The next day he drove up and said, “Sorry son, but I have some bad news, The horse died.”

Chuck replied, “Well, then just give me my money back.”

The farmer said, “Can’t do that. I went and spent it already.”

Chuck said, “Okay, then, just bring me the dead horse.”

The farmer asked, “What ya gonna do with him?”

Chuck said, “I’m going to raffle him off.”

The farmer said, “You can’t raffle off a dead horse!”

Chuck said, “Sure I can. Watch me. I just won’t tell anybody he’s dead.”

A month later, the farmer met up with Chuck and asked, “What happened with that dead horse?”

Chuck said, “I raffled him off. I sold 500 tickets at two dollars a piece and made a net profit of $898.”

The farmer said, “Didn’t anyone complain?”

Chuck said, “Just the guy who won. So I gave him his two dollars back.”

According to the .NET 4.5 documentation the Path.GetInvalidPathChars method:

‘Gets an array containing the characters that are not allowed in path names.’

This is not quite true! The following is the complete list of characters that is contained in the resulting array:

Path.GetInvalidPathChars array conetents

As you can see there are a few missing. The first ones that come to mind are ‘:‘, ‘\‘, ‘/‘, ‘?‘ and ‘*’. While not directly to do with paths, file names also cannot contain ‘;‘.

When using the JavaScript function Date.now in IE8 you may receive the following error:

‘Object doesn’t support this property or method’

This is caused by the fact that Date.now()wasn’t added to the JavaScript specification until ECMAScript 5. If you look at the functions entry on MSDN you will find the following under the requirements section:

‘Not supported in installed versions earlier than Internet Explorer 9. However, it is supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Also supported in Windows Store apps.’

What this little gem means that even if you switch the document mode in IE9 onwards you wont hit this issue! The only way to test for this issue is to actually have IE8 installed.

Fortunately, there is a simple solution to this issue which I found on Ari Fuchs Tumblr. To fix the issue just add the following to the top of any javascript file that used the Date.now function:

Date.now = Date.now || function() { return +new Date; };