Click here to Skip to main content
16,012,166 members
Home / Discussions / C#
   

C#

 
AnswerRe: Any container gurus out there (Dictionary and SortedDictionary) Pin
Christian Graus8-Oct-06 15:52
protectorChristian Graus8-Oct-06 15:52 
GeneralRe: Any container gurus out there (Dictionary and SortedDictionary) Pin
Julien9-Oct-06 12:55
Julien9-Oct-06 12:55 
GeneralRe: Any container gurus out there (Dictionary and SortedDictionary) Pin
Christian Graus9-Oct-06 13:04
protectorChristian Graus9-Oct-06 13:04 
QuestionFlatAppearance.BorderSize Pin
antonpaolo8-Oct-06 12:04
antonpaolo8-Oct-06 12:04 
QuestionWhy use exceptions...? Pin
Mark068-Oct-06 10:15
Mark068-Oct-06 10:15 
AnswerRe: Why use exceptions...? Pin
Nico van der Plas8-Oct-06 11:32
Nico van der Plas8-Oct-06 11:32 
AnswerRe: Why use exceptions...? Pin
Guffa8-Oct-06 12:06
Guffa8-Oct-06 12:06 
AnswerRe: Why use exceptions...? Pin
Christian Graus8-Oct-06 11:44
protectorChristian Graus8-Oct-06 11:44 
Mark06 wrote:
Imagine Im developing a function. I can either account for errors by using a try...catch statment, or I can raise an exception.


You should only catch exceptions that you know how to handle within the function. A try/catch around all your functions is a bad idea.

Mark06 wrote:
If I development a function that requires a integer parameter to be less than 10, why would I need to create an exception if its greater?


So the calling function knows why you couldn't process it's input.

Mark06 wrote:
So therefore, raising exceptions is bad?


That depends, would you prefer the program to crash on your machine, or on your users ? When an exception occurs, it indicates that a situation has arisen in your code which you've not properly handled.

FWIW, any windows program I write handles exceptions at the top level and writes them to a log file, exceptions are also exceptionally useful at helping me to work out why code that runs fine here, doesn't always work in the real world. Code that swallowed exceptions would not give me that information, and would make my life a lot more difficult.



Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

AnswerRe: Why use exceptions...? Pin
Guffa8-Oct-06 12:04
Guffa8-Oct-06 12:04 
AnswerRe: Why use exceptions...? Pin
Ennis Ray Lynch, Jr.8-Oct-06 13:12
Ennis Ray Lynch, Jr.8-Oct-06 13:12 
QuestionDuration of Media in C# Pin
ytubis8-Oct-06 10:13
ytubis8-Oct-06 10:13 
AnswerRe: Duration of Media in C# Pin
Christian Graus8-Oct-06 11:50
protectorChristian Graus8-Oct-06 11:50 
AnswerRe: Duration of Media in C# Pin
Niiiissssshhhhhuuuuu8-Oct-06 17:47
Niiiissssshhhhhuuuuu8-Oct-06 17:47 
QuestionPrinting Problem ...... Pin
galigal158-Oct-06 7:42
galigal158-Oct-06 7:42 
Questionstring array property Pin
Tuwing.Sabado8-Oct-06 6:37
Tuwing.Sabado8-Oct-06 6:37 
AnswerRe: string array property Pin
Nader Elshehabi8-Oct-06 6:40
Nader Elshehabi8-Oct-06 6:40 
GeneralRe: string array property Pin
Tuwing.Sabado8-Oct-06 7:05
Tuwing.Sabado8-Oct-06 7:05 
AnswerRe: string array property Pin
Martin#8-Oct-06 20:38
Martin#8-Oct-06 20:38 
QuestionHow to connect to an sql database that requires a password Pin
Anthony Mushrow8-Oct-06 5:59
professionalAnthony Mushrow8-Oct-06 5:59 
AnswerRe: How to connect to an sql database that requires a password Pin
mav.northwind8-Oct-06 6:24
mav.northwind8-Oct-06 6:24 
GeneralRe: How to connect to an sql database that requires a password Pin
Anthony Mushrow8-Oct-06 6:31
professionalAnthony Mushrow8-Oct-06 6:31 
QuestionHow to install a document in the Users My Documents folder Pin
Tad McClellan8-Oct-06 3:53
professionalTad McClellan8-Oct-06 3:53 
AnswerRe: How to install a document in the Users My Documents folder Pin
Anthony Mushrow8-Oct-06 6:03
professionalAnthony Mushrow8-Oct-06 6:03 
GeneralRe: How to install a document in the Users My Documents folder Pin
Tad McClellan8-Oct-06 6:11
professionalTad McClellan8-Oct-06 6:11 
AnswerRe: How to install a document in the Users My Documents folder Pin
Nader Elshehabi8-Oct-06 6:38
Nader Elshehabi8-Oct-06 6: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.