Click here to Skip to main content
15,912,292 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom ListBox.Items Pin
Heath Stewart17-Feb-04 4:52
protectorHeath Stewart17-Feb-04 4:52 
GeneralWinForms: SuspendLayout on Application Pin
troels_sorensen17-Feb-04 2:06
troels_sorensen17-Feb-04 2:06 
GeneralRe: WinForms: SuspendLayout on Application Pin
Heath Stewart17-Feb-04 4:54
protectorHeath Stewart17-Feb-04 4:54 
QuestionResize all items? Pin
thomasa17-Feb-04 1:51
thomasa17-Feb-04 1:51 
AnswerRe: Resize all items? Pin
Heath Stewart17-Feb-04 4:57
protectorHeath Stewart17-Feb-04 4:57 
GeneralRe: Resize all items? Pin
je_gonzalez17-Feb-04 17:28
je_gonzalez17-Feb-04 17:28 
GeneralRe: Resize all items? Pin
Heath Stewart17-Feb-04 19:35
protectorHeath Stewart17-Feb-04 19:35 
GeneralRe: Resize all items? Pin
je_gonzalez18-Feb-04 3:20
je_gonzalez18-Feb-04 3:20 
AnswerRe: Resize all items? Pin
je_gonzalez17-Feb-04 17:21
je_gonzalez17-Feb-04 17:21 
GeneralProblems with thread cancellation. Pin
Chen Pang17-Feb-04 1:21
Chen Pang17-Feb-04 1:21 
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 
Which is better code?

public object GetValue(Hashtable hashtable, object key)
{
if(hashTable == null)throw new ArgumentNullExeption("hashTable");
return hashtable[key];
}

or

public object GetValue(Hashtable hashtable, object key)
{
return hashtable[key];
}

Clearly the second example will throw anyway if the passed hashtable is null.
The first is more explicit if less concise. Is there any difference otherwise?

Any feedback would be appreciated.


Robert Zurer

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 
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 

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.