The second still returns a FileStream. Just a static helper method for a
FileStream constructor. Myself, I using the FileStream, so the FileMode,
FileAccess and FileShare are explicitly documented in my code at a glance.
File.Create is a static helper:
public static FileStream Create(string path, int bufferSize, FileOptions
options)
{
return new FileStream(path, FileMode.Create, FileAccess.ReadWrite,
FileShare.None, bufferSize, options);
}
--
William Stacey [MVP]
<mo******@yahoo.comwrote in message
news:44***********************@fe4.nntpserver.com. ..
| Which is better to use, FileStream or File.Create?