-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.IO
Milestone
Description
On the FileInfo.ToString documentation, it mentions the following:
FileInfo.ToString Method
Definition
Returns the path as a string. Use the Name property for the full path.
(See: https://learn.microsoft.com/en-us/dotnet/api/system.io.fileinfo.tostring?view=net-6.0#definition)
What's wrong?
The guidance about using the FileInfo.Name property to get the "full path" is incorrect. FileInfo.Name will only get you the file name without parent path information. This is misleading to readers.
Proposed change
Remove this superfluous guidance, as there is a remark below this section (marked important) that details what the path returned contains, as well as mentions the alternate methods of getting at file name and path information.
Metadata
Metadata
Assignees
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.IO