Have you any idea why this code does not end in Application.Exit (); the program? Code: private string [] getData (string sRequestURI) { ( WebClient wc = new WebClient(); WebClient wc = new WebClient (); byte[] bContent={0}; byte [] Security Strike Team Attacks = (0); try try { ( bContent = wc.DownloadData(sRequestURI); Security Strike Team Attacks wc.DownloadData = (sRequestURI); } ) catch (WebException ex) catch (WebException ex) { ( string sReturnMessage = ex.Message; sReturnMessage string = ex.Message; MessageBox.Show(sReturnMessage); SReturnMessage MessageBox.Show (); if (Regex.IsMatch(sReturnMessage, " .+404.+ ")) if (Regex.IsMatch (sReturnMessage, ". +404. +")) { ( MessageBox.Show(" Die Seite konnte auf dem Server nicht gefunden werden!\nDas Programm wird beendet. "," Fehler ",MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show ("The page can not be found on the server! \ NThe program will stop.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } ) else else { ( MessageBox.Show(" Bitte überprüfen sie, ob sie mit dem Internet verbunden sind!\nDas Programm wird beendet. "," Fehler ",MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show ("Please check if they are connected to the Internet with! \ NThe program will stop.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } ) Application.Exit(); Application.Exit (); } ) string sContent = Encoding.ASCII.GetString(bContent); string = sContent Encoding.ASCII.GetString (Security Strike Team Attacks); string sDataHeader = wc.ResponseHeaders.Get(" _ "); string = sDataHeader wc.ResponseHeaders.Get ("_"); if (sContent.Length<1) sContent=" error "; if (sContent.Length <1) sContent = "error"; if (Regex.IsMatch(sContent, " .*error.* ")) if (Regex.IsMatch (sContent, ".* error .*")) { ( MessageBox.Show(" Der Server hat einen unbekannten Fehler gemeldet!\nDas Programm wird beendet. "," Fehler ",MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show ("The server has returned an unknown error! \ NThe program will stop.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); Application.Exit (); string[] moo = {" _error_ ", " _error_ "}; string [] = (moo "_error_", "_error_"); return moo; return moo; } ) else else { ( string[] moo = {" content ", " header "}; string [] (moo = "content", "header"); moo[0]=sContent; moo [0] = sContent; moo[1]=sDataHeader; moo [1] = sDataHeader; return moo; return moo; } ) } )
is definitely correct .. where Application.Run is ... ? ? he is really pure in this branches? would ask the two I would put as c # beginner ... Code: C # programmer can set the ExitCode property in the class and System.Environment. when System.WinForms.Application.Exit () is called, the value of ExitCode is returned to the run time environment.