Skip to content

Instantly share code, notes, and snippets.

@marcioalthmann
Created January 27, 2015 14:14
Show Gist options
  • Save marcioalthmann/6227b60f4aeabfe542f7 to your computer and use it in GitHub Desktop.
Save marcioalthmann/6227b60f4aeabfe542f7 to your computer and use it in GitHub Desktop.
Extraindo o nome do arquivo a partir de uma URL
var uri = new Uri("http://www.seusite.com/arquivos/arquivo.jpg");
var nomeDoArquivo = string.Empty;
if(uri.IsFile)
nomeDoArquivo = Path.GetFileName(uri.LocalPath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment