dotnet / dotnet/dotnet-api-docs
delete, why bother?
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
the first 2 Create(..) signatures have examples with the first reminding users of potential concurrent activity (okay) whilst second is terser (the #3 #4 signatures contribute no enhanced example). Given that the Create method "Creates or overwrites a file in the specified path" the only reason for doing an explicit delete is if a file exists with the R/O attribute set [unlikely and would probably justify a confirmation dialog pop-up if was encountered).
So my suggestion is to remove the delete logic and comments in those 2 examples.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 29d94a8d-341c-5f29-7640-704144f60b69
* Version Independent ID: bb63691f-ecc3-0e26-3297-32b6e329d06a
* Content: [File.Create Method (System.IO)](https://docs.microsoft.com/en-us/dotnet/api/system.io.file.create?view=netframework-4.7.2)
* Content Source: [xml/System.IO/File.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.IO/File.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.