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

C#

 
AnswerRe: data and picker control in winforms using c3.net Pin
rah_sin1-Mar-10 19:25
professionalrah_sin1-Mar-10 19:25 
Questiontry catch in C# Pin
jojoba20111-Mar-10 17:17
jojoba20111-Mar-10 17:17 
AnswerRe: try catch in C# Pin
Nematjon Rahmanov1-Mar-10 19:13
Nematjon Rahmanov1-Mar-10 19:13 
AnswerRe: try catch in C# Pin
Dave Kreskowiak1-Mar-10 19:14
mveDave Kreskowiak1-Mar-10 19:14 
QuestionRe: try catch in C# Pin
jojoba20111-Mar-10 19:24
jojoba20111-Mar-10 19:24 
AnswerRe: try catch in C# Pin
N a v a n e e t h1-Mar-10 20:12
N a v a n e e t h1-Mar-10 20:12 
AnswerRe: try catch in C# Pin
Richard MacCutchan1-Mar-10 22:28
mveRichard MacCutchan1-Mar-10 22:28 
AnswerRe: try catch in C# Pin
PIEBALDconsult2-Mar-10 4:08
mvePIEBALDconsult2-Mar-10 4:08 
i=0 didn't cause the Exception; it's j/i.

You could put the three statements each in its own try/catch.

You could keep track of where you were in the process:

int x;

try
{
x=0;
int i=0;

x=1;
int j=2;

x=2;
int k=j/i;

x=3;
}
catch(Exception e)
{
string err="";

switch(x)
{
case 0: err = " caused by i=0" ; break ;
case 1: err = " caused by j=2" ; break ;
case 2: err = " caused by k=j/i" ; break ;
}

messagebox.show(e.Message + err );
}

AnswerRe: try catch in C# Pin
carlecomm2-Mar-10 17:36
carlecomm2-Mar-10 17:36 
QuestionStreamReader Pin
jojoba20111-Mar-10 17:01
jojoba20111-Mar-10 17:01 
AnswerRe: StreamReader Pin
Dr.Walt Fair, PE1-Mar-10 17:49
professionalDr.Walt Fair, PE1-Mar-10 17:49 
QuestionRe: StreamReader Pin
jojoba20111-Mar-10 18:01
jojoba20111-Mar-10 18:01 
AnswerRe: StreamReader Pin
Dr.Walt Fair, PE1-Mar-10 18:12
professionalDr.Walt Fair, PE1-Mar-10 18:12 
QuestionRe: StreamReader [modified] Pin
jojoba20111-Mar-10 19:07
jojoba20111-Mar-10 19:07 
AnswerRe: StreamReader Pin
Dr.Walt Fair, PE2-Mar-10 4:46
professionalDr.Walt Fair, PE2-Mar-10 4:46 
AnswerRe: StreamReader Pin
V.1-Mar-10 20:01
professionalV.1-Mar-10 20:01 
AnswerRe: StreamReader Pin
carlecomm2-Mar-10 17:57
carlecomm2-Mar-10 17:57 
QuestionSpeechSynthesizer memory leak Pin
FocusedWolf1-Mar-10 16:16
FocusedWolf1-Mar-10 16:16 
AnswerRe: SpeechSynthesizer memory leak Pin
Dave Kreskowiak1-Mar-10 19:10
mveDave Kreskowiak1-Mar-10 19:10 
GeneralRe: SpeechSynthesizer memory leak Pin
FocusedWolf2-Mar-10 1:46
FocusedWolf2-Mar-10 1:46 
GeneralRe: SpeechSynthesizer memory leak Pin
Dave Kreskowiak2-Mar-10 13:04
mveDave Kreskowiak2-Mar-10 13:04 
GeneralRe: SpeechSynthesizer memory leak Pin
FocusedWolf3-Mar-10 18:12
FocusedWolf3-Mar-10 18:12 
GeneralRe: SpeechSynthesizer memory leak Pin
Dave Kreskowiak4-Mar-10 1:33
mveDave Kreskowiak4-Mar-10 1:33 
AnswerRe: SpeechSynthesizer memory leak Pin
DudeFX55714-Mar-10 18:42
DudeFX55714-Mar-10 18:42 
QuestionScroll synchronization of two RichTextBox controls Pin
hain1-Mar-10 13:34
hain1-Mar-10 13:34 

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.