i stumbled upon this bit here in a project from a colleague:
foreach (var invalidChar in Path.GetInvalidFileNameChars())
fileName = fileName.Replace(invalidChar, '\0');
the gerenal idea is obvious enough but i wonder why he chose to replace the invalid chars with the literal for the null char instead of a 'regular' char or just an empty string.
i guess there's a good reason for this choice(the guy who wrote this is a senior in our team), i'd just like to know what this reason is.