Click here to Skip to main content
15,902,634 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to create shape file in C# Pin
ssliew14-Aug-07 19:35
ssliew14-Aug-07 19:35 
GeneralRe: How to create shape file in C# Pin
Christian Graus14-Aug-07 19:37
protectorChristian Graus14-Aug-07 19:37 
GeneralRe: How to create shape file in C# Pin
ssliew15-Aug-07 15:28
ssliew15-Aug-07 15:28 
Questionproblem about MS Word Pin
kcynic14-Aug-07 17:30
kcynic14-Aug-07 17:30 
AnswerRe: problem about MS Word Pin
Malcolm Smart14-Aug-07 21:20
Malcolm Smart14-Aug-07 21:20 
GeneralRe: problem about MS Word Pin
kcynic15-Aug-07 5:17
kcynic15-Aug-07 5:17 
QuestionIAsynResult problem - hit a brick wall Pin
Glen Harvy14-Aug-07 17:26
Glen Harvy14-Aug-07 17:26 
AnswerRe: IAsynResult problem - hit a brick wall Pin
Leslie Sanford14-Aug-07 17:58
Leslie Sanford14-Aug-07 17:58 
Is this in a Form application? If so...

delegate void Result(string s);
 
delegate void ExceptionHandler(Exception ex);
  
private void MyCallback(IAsyncResult ar)
{      
    getDNS getIP = (getDNS)ar.AsyncState;      
 
    try
    {
        string result = getIP.EndInvoke(ar);
 
        BeginInvoke(new Result(MyResultMethod), result);
    } 
    catch(Exception ex) // Probably should catch a more specific Exception type.
    {
        BeginInvoke(new ExceptionHandler(MyExceptionHandler), ex);
    }
}
 
private void MyResultMethod(string s)
{
    MessageBox.Show(s);
 
    // Do other updating...
}
 
private void MyExceptionHandlerMethod(Exception ex)
{
    MessageBox.Show(ex.Message);
 
    // Other exception handling code...
}


The above should work. Generally, you don't want to catch Exceptions, but rather one or more of the derived exception classes. It may be ok in this situation. Not sure.
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy14-Aug-07 19:15
Glen Harvy14-Aug-07 19:15 
GeneralRe: IAsynResult problem - hit a brick wall Pin
pbraun14-Aug-07 19:36
pbraun14-Aug-07 19:36 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy14-Aug-07 23:20
Glen Harvy14-Aug-07 23:20 
GeneralRe: IAsynResult problem - hit a brick wall Pin
pbraun15-Aug-07 5:09
pbraun15-Aug-07 5:09 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy15-Aug-07 10:50
Glen Harvy15-Aug-07 10:50 
GeneralRe: IAsynResult problem - hit a brick wall Pin
pbraun15-Aug-07 11:43
pbraun15-Aug-07 11:43 
GeneralRe: IAsynResult problem - hit a brick wall [modified] Pin
Glen Harvy14-Aug-07 23:09
Glen Harvy14-Aug-07 23:09 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Leslie Sanford15-Aug-07 5:15
Leslie Sanford15-Aug-07 5:15 
GeneralRe: IAsynResult problem - hit a brick wall Pin
Glen Harvy15-Aug-07 11:00
Glen Harvy15-Aug-07 11:00 
QuestionHow to comunicate with CD printer Pin
Richard Blythe14-Aug-07 16:03
Richard Blythe14-Aug-07 16:03 
AnswerRe: How to comunicate with CD printer Pin
Christian Graus14-Aug-07 17:03
protectorChristian Graus14-Aug-07 17:03 
QuestionSourcegrid Installation Pin
Papi83dm14-Aug-07 12:57
Papi83dm14-Aug-07 12:57 
AnswerRe: Sourcegrid Installation Pin
Ed.Poore14-Aug-07 15:09
Ed.Poore14-Aug-07 15:09 
AnswerRe: Sourcegrid Installation Pin
Christian Graus14-Aug-07 17:03
protectorChristian Graus14-Aug-07 17:03 
AnswerRe: Sourcegrid Installation Pin
Papi83dm15-Aug-07 2:52
Papi83dm15-Aug-07 2:52 
QuestionReplace umlauts Pin
SilverV14-Aug-07 12:32
SilverV14-Aug-07 12:32 
AnswerRe: Replace umlauts Pin
bit_cmdr14-Aug-07 12:57
bit_cmdr14-Aug-07 12:57 

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.