try / catch C#

Tentar fazer algo ou então


try
{
System.IO.File.Copy(@"C:\Users\pedro.falcao\Desktop\Falcao_ficheiros\Curioso.txt", @"\\florenciosousa\SHARE\Curioso.txt" /*@"\\florenciosousa\Users\florencio.sousa\Desktop\Curioso.txt"*/, true);
   Console.Write("copy sucessful");
   Console.ReadLine();
}
   catch (Exception ex)
{
   Console.Write("path not found");
   Console.ReadLine();
}
finally
{

}

Comentários

Mensagens populares