FileSystemInfo.ToString Método

Definição

Retorna o caminho original.Returns the original path. Use as propriedades FullName ou Name para o caminho completo ou o nome do arquivo/do diretório.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

Retornos

String

Uma cadeia de caracteres com o caminho original.A string with the original path.

Comentários

Importante

A cadeia de caracteres retornada pelo ToString método representa o caminho que foi passado para o construtor da classe que está implementando FileSystemInfo .The string returned by theToString method represents the path that was passed to the constructor of the class implementing FileSystemInfo. Em vez de chamar o ToString método, você deve recuperar o valor de uma das seguintes propriedades, dependendo da sua intenção:Instead of calling the ToString method, you should retrieve the value of either of the following properties, depending on your intent:

  • Name, para obter o nome do arquivo ou diretório, sem qualquer informação de caminho pai.Name, to get the name of the file or directory, without any parent path information.
  • FullName, para obter o caminho totalmente qualificado do arquivo ou diretório.FullName, to get the fully qualified path of the file or directory.

Aplica-se a