Click here to Skip to main content
16,006,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: Merging Graphics Pin
Xmen Real 21-May-08 16:43
professional Xmen Real 21-May-08 16:43 
GeneralRe: Merging Graphics Pin
Christian Graus21-May-08 17:20
protectorChristian Graus21-May-08 17:20 
GeneralTieing data in a general DataView to a DataTable Pin
MAW3021-May-08 16:05
MAW3021-May-08 16:05 
QuestionHelp With XML Reading Pin
That Asian Guy21-May-08 14:58
That Asian Guy21-May-08 14:58 
QuestionDrop-List Pin
nelsonpaixao21-May-08 14:51
nelsonpaixao21-May-08 14:51 
AnswerRe: Drop-List Pin
Judah Gabriel Himango21-May-08 17:15
sponsorJudah Gabriel Himango21-May-08 17:15 
AnswerRe: Drop-List Pin
DaveyM6922-May-08 10:43
professionalDaveyM6922-May-08 10:43 
QuestionException Handling Pin
MarkB77721-May-08 13:57
MarkB77721-May-08 13:57 
Hi,

I've got a quick question about exception handling.

Ive got a program which is continuously accessing a network. 1/10 times the program would crash giving an exception saying the current port was in use.

This exception only occured when the user changed the listening port, so it was going to happen very seldomly in release.

I found an easy fix for the problem was to put some try blocks around the problem code, and catch an IO exception.

When the IO exception was fired, the method would cease operating (return). The program automatically fixed itself within 200ms (because of an internal timer which rescanned the network.

Do people do this often in industry? i.e

<br />
<br />
private void Foo()<br />
{<br />
    try<br />
    {<br />
       owdEnum = OneWireAccessProvider.getAllDeviceContainers();<br />
    }<br />
    catch (OneWireIOException) { return; }<br />
<br />
<br />
    // Do process on the enum (if I didnt return above the code would crash<br />
}<br />
<br />



Cheers,


AnswerRe: Exception Handling Pin
Christian Graus21-May-08 14:04
protectorChristian Graus21-May-08 14:04 
AnswerRe: Exception Handling Pin
Ennis Ray Lynch, Jr.21-May-08 17:43
Ennis Ray Lynch, Jr.21-May-08 17:43 
QuestionProblem with Form_Paint and using Trig Pin
RedHotFunk21-May-08 13:40
RedHotFunk21-May-08 13:40 
AnswerRe: Problem with Form_Paint and using Trig Pin
Judah Gabriel Himango21-May-08 17:14
sponsorJudah Gabriel Himango21-May-08 17:14 
QuestionHow to call a form if you know the form name only as a string variable &gt; Pin
unitecsoft21-May-08 13:27
unitecsoft21-May-08 13:27 
AnswerRe: How to call a form if you know the form name only as a string variable &gt; Pin
Judah Gabriel Himango21-May-08 13:51
sponsorJudah Gabriel Himango21-May-08 13:51 
GeneralRe: How to call a form if you know the form name only as a string variable &gt; Pin
unitecsoft21-May-08 14:46
unitecsoft21-May-08 14:46 
GeneralRe: How to call a form if you know the form name only as a string variable &gt; Pin
Judah Gabriel Himango21-May-08 17:12
sponsorJudah Gabriel Himango21-May-08 17:12 
AnswerRe: How to call a form if you know the form name only as a string variable &gt; Pin
Gareth H21-May-08 14:29
Gareth H21-May-08 14:29 
QuestionVisual Studio Add-In: remove tool icon when done Pin
DeepToot21-May-08 11:26
DeepToot21-May-08 11:26 
AnswerRe: Visual Studio Add-In: remove tool icon when done Pin
Judah Gabriel Himango21-May-08 11:35
sponsorJudah Gabriel Himango21-May-08 11:35 
GeneralRe: Visual Studio Add-In: remove tool icon when done Pin
DeepToot21-May-08 17:03
DeepToot21-May-08 17:03 
AnswerRe: Visual Studio Add-In: remove tool icon when done Pin
DeepToot21-May-08 17:30
DeepToot21-May-08 17:30 
QuestionControl.Remove vs control.dispose(); Pin
netJP12L21-May-08 11:07
netJP12L21-May-08 11:07 
AnswerRe: Control.Remove vs control.dispose(); Pin
Judah Gabriel Himango21-May-08 11:11
sponsorJudah Gabriel Himango21-May-08 11:11 
AnswerRe: Control.Remove vs control.dispose(); Pin
Spacix One21-May-08 11:16
Spacix One21-May-08 11:16 
GeneralMVP and Validation of User Input Pin
mr_lasseter21-May-08 10:53
mr_lasseter21-May-08 10:53 

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.