Messages - Ehtyar [ switch to compact view ]

Pages: prev1 ... 242 243 244 245 246 [247]
1231
It would be an extremely lazy coder making the assumption that the first period in a file name is the start of the extension. All one has to do to be sure they have the extension is count backward from the end of the filename instead of forward from the start. Of course that makes the assumption that there is an extension at all, so it's best to have the length of the filename to count down to, and inform the user if any file they selected is missing an extension where one is required.
The laziness is even more stark given the Path* api, in particular PathFindExtension which do all path related work for you.

Ehtyar.

Pages: prev1 ... 242 243 244 245 246 [247]
Go to full version