Created
September 17, 2013 14:01
-
-
Save egomesbrandao/6594715 to your computer and use it in GitHub Desktop.
Série: Código idiota... programador estúpido!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice :D