This is in relation to this other SO question which asks how to overwrite an existing file.
The top answer is this:
FileStream file = File.Open("text.txt", FileMode.Create);
My answer was this:
FileStream fs = System.IO.File.Create(fileName);
As of when I wrote this question, the tally was 14-0 in favor of Open
.
If votes are an indication of good versus bad solutions, this makes me wonder a bit:
Is there something I'm missing in these methods that would make it clearly that much better to choose
Open
overCreate
?