Skip to content

Instantly share code, notes, and snippets.

@egomesbrandao
Created September 17, 2013 14:01
Show Gist options
  • Save egomesbrandao/6594715 to your computer and use it in GitHub Desktop.
Save egomesbrandao/6594715 to your computer and use it in GitHub Desktop.
Série: Código idiota... programador estúpido!
public static bool verificaArquivoTxt()
{
return (File.Exists(System.Configuration.ConfigurationManager.AppSettings["ArqTxt"].ToString()));
}
bool verif = verificaArquivoTxt();
if (verif == true)
{
dt = LeituraTXT();
Obj.EnviarDados(dt);
}
else
{
if (!File.Exists(System.Configuration.ConfigurationManager.AppSettings["ArqTxt"].ToString()))
{
throw (new FileNotFoundException("Não foi possivel localizar o arquivo especificado"));
}
}
@brunoadacosta
Copy link

nice :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment