Click here to Skip to main content
15,896,453 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to convert float value to time? Pin
Expert Coming4-Aug-06 21:09
Expert Coming4-Aug-06 21:09 
QuestionHow to assign a specific value to all the array elements at the time of initilization? Pin
signbit4-Aug-06 19:29
signbit4-Aug-06 19:29 
AnswerRe: How to assign a specific value to all the array elements at the time of initilization? Pin
Stefan Troschuetz4-Aug-06 21:46
Stefan Troschuetz4-Aug-06 21:46 
QuestionInvalid certificate [modified] Pin
stellasworkinc4-Aug-06 17:35
stellasworkinc4-Aug-06 17:35 
QuestionDear Expert .. Problem with Thread Pin
Aldorado4-Aug-06 12:54
Aldorado4-Aug-06 12:54 
AnswerRe: Dear Expert .. Problem with Thread Pin
Rob Graham4-Aug-06 16:18
Rob Graham4-Aug-06 16:18 
GeneralRe: Dear Expert .. Problem with Thread Pin
Aldorado5-Aug-06 21:28
Aldorado5-Aug-06 21:28 
GeneralRe: Dear Expert .. Problem with Thread Pin
Rob Graham7-Aug-06 5:45
Rob Graham7-Aug-06 5:45 
Are you catching exceptions in your worker threads? If so, how do you handle ThreadAbortException?

A typical pattern might be:
public volatile bool quit;      //make volatile so compiler doesn't optimize in loops
public  void runtickerThread()
{
   try
   {
        while(!quit)
        {
          DoStuff();
        }
    }
    catch(ThreadAbortException)
    {
         Thread.ResetAbort; // keep exeption from being raised again at end of catch
         quit = true;
    }
    catch(ApplicationException)
    {
      //handle other exceptions
    }
    finally
    {
      //make sure thread can't loop endlessly here, since Abort will always execute this
    }
}
  
private void Game_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
  try
  {
   this.quit = true; //signal stop
   this.tickerThread.Abort(); //don't really need this, quit bool should be enough
   this.tickerTread.Join();  //wait for thread to stop - should always wait

   }
   catch{}
}



QuestionA new type of number incrementor.... perhaps? Pin
CAgent0074-Aug-06 12:08
CAgent0074-Aug-06 12:08 
AnswerRe: A new type of number incrementor.... perhaps? Pin
Guffa4-Aug-06 12:15
Guffa4-Aug-06 12:15 
GeneralRe: A new type of number incrementor.... perhaps? Pin
CAgent0075-Aug-06 10:52
CAgent0075-Aug-06 10:52 
QuestionRe: A new type of number incrementor.... perhaps? Pin
CAgent0076-Aug-06 11:27
CAgent0076-Aug-06 11:27 
AnswerRe: A new type of number incrementor.... perhaps? Pin
Leslie Sanford4-Aug-06 16:01
Leslie Sanford4-Aug-06 16:01 
QuestionTimers Pin
SoftcodeSoftware4-Aug-06 10:51
SoftcodeSoftware4-Aug-06 10:51 
AnswerRe: Timers Pin
Not Active4-Aug-06 11:11
mentorNot Active4-Aug-06 11:11 
GeneralRe: Timers Pin
SoftcodeSoftware4-Aug-06 11:16
SoftcodeSoftware4-Aug-06 11:16 
GeneralRe: Timers Pin
Dave Kreskowiak4-Aug-06 11:53
mveDave Kreskowiak4-Aug-06 11:53 
GeneralRe: Timers Pin
SoftcodeSoftware4-Aug-06 12:22
SoftcodeSoftware4-Aug-06 12:22 
GeneralRe: Timers Pin
Dave Kreskowiak4-Aug-06 16:18
mveDave Kreskowiak4-Aug-06 16:18 
AnswerRe: Timers Pin
eggie55-Aug-06 20:51
eggie55-Aug-06 20:51 
QuestionString into resource? [modified] Pin
SoftcodeSoftware4-Aug-06 10:30
SoftcodeSoftware4-Aug-06 10:30 
AnswerRe: String into resource? Pin
Judah Gabriel Himango4-Aug-06 11:21
sponsorJudah Gabriel Himango4-Aug-06 11:21 
GeneralRe: String into resource? Pin
SoftcodeSoftware4-Aug-06 11:34
SoftcodeSoftware4-Aug-06 11:34 
GeneralRe: String into resource? Pin
Judah Gabriel Himango5-Aug-06 10:32
sponsorJudah Gabriel Himango5-Aug-06 10:32 
QuestionUnmanaged C++ DLL Calling Pin
skinnyreptile1684-Aug-06 9:38
skinnyreptile1684-Aug-06 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.