I have a method to read a file, the parameter should be the fully qualified file name.
The code I have uses fileName, filePath, or path randomly.
void ReadSomeFile(String fileName);
void ReadSomeFile(String filePath);
void ReadSomeFile(String path);
The .net method "File.Exists(string path)" uses path, but "FileDialog.FileName" uses fileName.
Which name do you suggest to use?
I, personally, would use filePath
, as it's the most explicit.
That being said, whatever you choose, I would make sure that your documentation explicitly states that you require the fully qualified file name with path, if that is required by your method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With