CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Application.Exit () topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2010, 07:51 PM
Member
 
Join Date: Feb 2010
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
inspiration is on a distinguished road
| More
Exclamation Application.Exit ()

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;
} )
} )
Reply With Quote
  #2  
Old 06-03-2010, 07:52 PM
Member
 
Join Date: Feb 2010
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
creative is on a distinguished road
| More
Re: Application.Exit ()

bcb is it?
if so, try using Application-> Exit ();
Reply With Quote
  #3  
Old 06-03-2010, 07:53 PM
Member
 
Join Date: Feb 2010
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
inspiration is on a distinguished road
| More
Re: Application.Exit ()

BCB?

My code is 'normal' C #

With -> can not.
Reply With Quote
  #4  
Old 06-03-2010, 07:57 PM
Senior Member
 
Join Date: Feb 2010
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
meyup is on a distinguished road
| More
Cool Re: Application.Exit ()

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture video from application rao C++ Programming 1 01-06-2009 04:07 AM
Best Exit Signs & Lighting Solutions coderzone Sell Your Code 1 08-03-2008 11:27 PM
Doubt in MDI application dathatreya MFC Programming 1 07-08-2008 02:32 AM
convert dialog application rachel196 MFC Programming 1 06-26-2008 10:31 AM
HELP with C++ - Forms Application miklavcicmatic C++ Programming 4 06-10-2007 02:44 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:30 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board