Editare

Partajați prin


FileSystemInfo.ToString Method

Definition

Returns the original path. Use the FullName or Name properties for the full path or file/directory name.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

A string with the original path.

Remarks

Important

The string returned by theToString method represents the path that was passed to the constructor of the class implementing FileSystemInfo. Instead of calling the ToString method, you should retrieve the value of either of the following properties, depending on your intent:

  • Name, to get the name of the file or directory, without any parent path information.
  • FullName, to get the fully qualified path of the file or directory.

Applies to