Click here to Skip to main content
15,925,369 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionSerializable Classes? Pin
obarahmeh27-Aug-08 1:52
obarahmeh27-Aug-08 1:52 
AnswerRe: Serializable Classes? Pin
Pete O'Hanlon27-Aug-08 2:11
mvePete O'Hanlon27-Aug-08 2:11 
AnswerRe: Serializable Classes? Pin
led mike27-Aug-08 4:57
led mike27-Aug-08 4:57 
QuestionCustom Exception Handling Pin
shecool26-Aug-08 20:30
shecool26-Aug-08 20:30 
AnswerRe: Custom Exception Handling Pin
Brij26-Aug-08 21:57
mentorBrij26-Aug-08 21:57 
AnswerRe: Custom Exception Handling Pin
Mark Salsbery27-Aug-08 7:32
Mark Salsbery27-Aug-08 7:32 
AnswerRe: Custom Exception Handling Pin
Colin Angus Mackay28-Aug-08 12:57
Colin Angus Mackay28-Aug-08 12:57 
GeneralRe: Custom Exception Handling Pin
dojohansen2-Sep-08 0:00
dojohansen2-Sep-08 0:00 
I think the contents of the try block was made up and had nothing to do with his problem. Smile | :) It seems that he does have a try-block that calls into something which might throw MyException, and the problem he had was that when *another* exception occured it was not caught.

The correct pattern to use has already been provided; I'll just add that the rule is to catch the most specific exception first, then less specific ones.

try
{
...
}
catch (MyException mex)
{
... // runs if try-block throws MyException
}
catch (Exception ex)
{

}

Finally, I'll just mention that a finally block might come in handy in some of these cases, such as when "cleanup" of any kind is needed - eg. close a database connection.
GeneralRe: Custom Exception Handling Pin
Colin Angus Mackay2-Sep-08 0:46
Colin Angus Mackay2-Sep-08 0:46 
QuestionVB.NET Dataset Does not save changes Pin
viperdrake26-Aug-08 11:50
viperdrake26-Aug-08 11:50 
AnswerRe: VB.NET Dataset Does not save changes Pin
Ray Cassick26-Aug-08 16:23
Ray Cassick26-Aug-08 16:23 
Questionstatic dataset Pin
bfis10813726-Aug-08 7:06
bfis10813726-Aug-08 7:06 
AnswerRe: static dataset Pin
Wendelius26-Aug-08 7:49
mentorWendelius26-Aug-08 7:49 
GeneralRe: static dataset Pin
bfis10813726-Aug-08 7:56
bfis10813726-Aug-08 7:56 
GeneralRe: static dataset Pin
Wendelius26-Aug-08 8:09
mentorWendelius26-Aug-08 8:09 
Question.Net for UNIX based system Pin
sinhasourabh26-Aug-08 6:55
sinhasourabh26-Aug-08 6:55 
QuestionRe: .Net for UNIX based system Pin
led mike26-Aug-08 7:01
led mike26-Aug-08 7:01 
Questionjava script timer control Pin
balaji.t25-Aug-08 0:27
balaji.t25-Aug-08 0:27 
AnswerRe: java script timer control Pin
Brij25-Aug-08 1:28
mentorBrij25-Aug-08 1:28 
AnswerRe: java script timer control Pin
John Ad25-Aug-08 4:17
John Ad25-Aug-08 4:17 
QuestionWhat do i use for the list of blocks, containing pictures and several controls? [modified] Pin
DbIMKA23-Aug-08 7:48
DbIMKA23-Aug-08 7:48 
AnswerRe: What do i use for the list of blocks, containing pictures and several controls? Pin
Pete O'Hanlon24-Aug-08 11:38
mvePete O'Hanlon24-Aug-08 11:38 
GeneralRe: What do i use for the list of blocks, containing pictures and several controls? Pin
DbIMKA24-Aug-08 22:27
DbIMKA24-Aug-08 22:27 
GeneralRe: What do i use for the list of blocks, containing pictures and several controls? Pin
Pete O'Hanlon25-Aug-08 22:43
mvePete O'Hanlon25-Aug-08 22:43 
GeneralRe: What do i use for the list of blocks, containing pictures and several controls? Pin
DbIMKA26-Aug-08 23:38
DbIMKA26-Aug-08 23: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.