c# - Why is File.Open so much better than File.Create for overwriting an existing file? -
This is in relation to another that asks to overwrite an existing file.
Top of the answer is:
filestream file = file. Open ("text.txt", FileMode.Create); My answer was:
file stream fs = System.IO.File.Create (fileName); When I wrote this question, Milan was 14-0 in favor of open .
If the sign of the vote is a good vs bad solution, it makes me wonder:
Am I missing in some ways that make it clear clearly? Will
opencreate?
For me, I know exactly what is File.Open ("...", FileMode.Create) because I can hover over FileMode.Creative and it tells me that a new file will be created every time. Create.Create ("...") There is no tool tip which indicates that it will do so.
Comments
Post a Comment