Click here to Skip to main content
15,891,718 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problems with thread cancellation. Pin
Corinna John17-Feb-04 1:41
Corinna John17-Feb-04 1:41 
GeneralRe: Problems with thread cancellation. Pin
Chen Pang17-Feb-04 1:53
Chen Pang17-Feb-04 1:53 
QuestionException Handling . To throw or not to throw? Pin
bzurer17-Feb-04 1:05
bzurer17-Feb-04 1:05 
AnswerRe: Exception Handling . To throw or not to throw? Pin
Jonathan de Halleux17-Feb-04 1:13
Jonathan de Halleux17-Feb-04 1:13 
GeneralRe: Exception Handling . To throw or not to throw? Pin
bzurer17-Feb-04 1:50
bzurer17-Feb-04 1:50 
GeneralRe: Exception Handling . To throw or not to throw? Pin
Jonathan de Halleux17-Feb-04 2:09
Jonathan de Halleux17-Feb-04 2:09 
GeneralRe: Exception Handling . To throw or not to throw? Pin
bzurer17-Feb-04 1:56
bzurer17-Feb-04 1:56 
AnswerRe: Exception Handling . To throw or not to throw? Pin
Heath Stewart17-Feb-04 5:04
protectorHeath Stewart17-Feb-04 5:04 
IMO, throw the ArgumentNullException. If you don't, the CLR will throw a NullReferenceException, and those are always annoying because any reference Type throughout the executing code could be null and you'll have to debug to find out which. Throwing the ArgumentNullException exception should make it obvious. Either way, the calling code should catch the exception and display a user-friendly error (though in this example, there's no excuse for an exception being thrown in a release app).

In the base class library assemblies, any params that shouldn't be null are checked in this manner.

 

Microsoft MVP, Visual C#
My Articles
GeneralAccessing properties as an array Pin
Omega50116-Feb-04 21:28
Omega50116-Feb-04 21:28 
GeneralRe: Accessing properties as an array Pin
thomasa16-Feb-04 23:32
thomasa16-Feb-04 23:32 
GeneralRe: Accessing properties as an array Pin
Heath Stewart17-Feb-04 5:11
protectorHeath Stewart17-Feb-04 5:11 
GeneralRe: Accessing properties as an array Pin
OmegaSupreme17-Feb-04 0:46
OmegaSupreme17-Feb-04 0:46 
GeneralRe: Accessing properties as an array Pin
Jonathan de Halleux17-Feb-04 1:15
Jonathan de Halleux17-Feb-04 1:15 
GeneralRe: Accessing properties as an array Pin
OmegaSupreme17-Feb-04 1:46
OmegaSupreme17-Feb-04 1:46 
GeneralRe: Accessing properties as an array Pin
Omega50117-Feb-04 9:34
Omega50117-Feb-04 9:34 
GeneralRe: Accessing properties as an array Pin
OmegaSupreme17-Feb-04 12:43
OmegaSupreme17-Feb-04 12:43 
Generalapplication uses all the memory Pin
amadeonMk16-Feb-04 21:23
amadeonMk16-Feb-04 21:23 
GeneralRe: application uses all the memory Pin
Heath Stewart17-Feb-04 5:20
protectorHeath Stewart17-Feb-04 5:20 
GeneralRe: application uses all the memory Pin
Chen Pang17-Feb-04 23:13
Chen Pang17-Feb-04 23:13 
GeneralRe: application uses all the memory Pin
Heath Stewart18-Feb-04 3:55
protectorHeath Stewart18-Feb-04 3:55 
Generalclosing the main form after loading another form Pin
killermoses16-Feb-04 19:31
killermoses16-Feb-04 19:31 
GeneralRe: closing the main form after loading another form Pin
John Kuhn16-Feb-04 19:38
John Kuhn16-Feb-04 19:38 
GeneralRe: closing the main form after loading another form Pin
obelisk2916-Feb-04 19:48
obelisk2916-Feb-04 19:48 
GeneralRe: closing the main form after loading another form Pin
killermoses17-Feb-04 2:02
killermoses17-Feb-04 2:02 
GeneralRe: closing the main form after loading another form Pin
Heath Stewart17-Feb-04 5:26
protectorHeath Stewart17-Feb-04 5:26 

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.