Click here to Skip to main content
15,887,464 members
Home / Discussions / C#
   

C#

 
AnswerRe: want to create a popup window to show message on program start Pin
Not Active28-Mar-10 17:13
mentorNot Active28-Mar-10 17:13 
AnswerRe: want to create a popup window to show message on program start Pin
Mycroft Holmes28-Mar-10 19:40
professionalMycroft Holmes28-Mar-10 19:40 
Questionany solutions? Pin
95ulisse28-Mar-10 4:40
95ulisse28-Mar-10 4:40 
AnswerRe: any solutions? Pin
Dan Mos28-Mar-10 4:58
Dan Mos28-Mar-10 4:58 
GeneralRe: any solutions? Pin
95ulisse29-Mar-10 3:07
95ulisse29-Mar-10 3:07 
AnswerDon't ask the same question again PinPopular
Not Active28-Mar-10 5:57
mentorNot Active28-Mar-10 5:57 
Questionwhere to put try catch block! Pin
Hussam Fattahi28-Mar-10 4:23
Hussam Fattahi28-Mar-10 4:23 
AnswerRe: wher to put try catch block! Pin
DaveyM6928-Mar-10 4:34
professionalDaveyM6928-Mar-10 4:34 
It depends on what you're going to do with the exception. If the exception is of no consequence to external code and can be handled within the Save method itself, then keep the try/catch in there.

If the calling code may (now or in the future) want to do something depending on the exception then wrap the Save in the calling code.

The second way is more flexible in the long term IMO. If you decide to use the first then it may be worth changing the Save to return a bool to indicate success or failure to the calling code so it still has the option of retrying the Save operation.
Dave

If this helped, please vote & accept answer!


Binging is like googling, it just feels dirtier. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

GeneralRe: wher to put try catch block! Pin
Hussam Fattahi28-Mar-10 4:54
Hussam Fattahi28-Mar-10 4:54 
GeneralRe: wher to put try catch block! Pin
DaveyM6928-Mar-10 5:07
professionalDaveyM6928-Mar-10 5:07 
GeneralRe: wher to put try catch block! Pin
Hussam Fattahi28-Mar-10 5:15
Hussam Fattahi28-Mar-10 5:15 
AnswerRe: wher to put try catch block! Pin
Eddy Vluggen28-Mar-10 4:39
professionalEddy Vluggen28-Mar-10 4:39 
GeneralRe: wher to put try catch block! Pin
Hussam Fattahi28-Mar-10 4:56
Hussam Fattahi28-Mar-10 4:56 
AnswerRe: where to put try catch block! Pin
Richard MacCutchan28-Mar-10 4:40
mveRichard MacCutchan28-Mar-10 4:40 
GeneralRe: where to put try catch block! Pin
Hussam Fattahi28-Mar-10 4:52
Hussam Fattahi28-Mar-10 4:52 
GeneralRe: where to put try catch block! Pin
Richard MacCutchan28-Mar-10 4:57
mveRichard MacCutchan28-Mar-10 4:57 
GeneralRe: where to put try catch block! Pin
Hussam Fattahi28-Mar-10 5:04
Hussam Fattahi28-Mar-10 5:04 
GeneralRe: where to put try catch block! Pin
Eddy Vluggen28-Mar-10 5:23
professionalEddy Vluggen28-Mar-10 5:23 
AnswerRe: where to put try catch block! Pin
Keith Barrow28-Mar-10 4:58
professionalKeith Barrow28-Mar-10 4:58 
GeneralRe: where to put try catch block! Pin
Hussam Fattahi28-Mar-10 5:07
Hussam Fattahi28-Mar-10 5:07 
GeneralRe: where to put try catch block! Pin
Kevin McFarlane28-Mar-10 5:46
Kevin McFarlane28-Mar-10 5:46 
AnswerRe: where to put try catch block! Pin
Abhinav S28-Mar-10 5:12
Abhinav S28-Mar-10 5:12 
AnswerRe: where to put try catch block! Pin
PIEBALDconsult28-Mar-10 19:16
mvePIEBALDconsult28-Mar-10 19:16 
QuestionUnable to change registry values Pin
Aseem Sharma27-Mar-10 21:18
Aseem Sharma27-Mar-10 21:18 
AnswerRe: Unable to change registry values Pin
Richard MacCutchan27-Mar-10 21:35
mveRichard MacCutchan27-Mar-10 21:35 

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.