Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
AnswerRe: what is the "game engine"???? Pin
Pete O'Hanlon13-Sep-11 23:52
mvePete O'Hanlon13-Sep-11 23:52 
GeneralRe: what is the "game engine"???? Pin
OriginalGriff14-Sep-11 3:10
mveOriginalGriff14-Sep-11 3:10 
GeneralRe: what is the "game engine"???? Pin
molesworth14-Sep-11 7:27
molesworth14-Sep-11 7:27 
QuestionGetThreadPreferredUILanguages Pin
marca29213-Sep-11 22:56
marca29213-Sep-11 22:56 
AnswerRe: GetThreadPreferredUILanguages Pin
Luc Pattyn14-Sep-11 1:52
sitebuilderLuc Pattyn14-Sep-11 1:52 
AnswerRe: GetThreadPreferredUILanguages Pin
BobJanova14-Sep-11 2:14
BobJanova14-Sep-11 2:14 
QuestionWhere to use Try/Catch block? [modified] Pin
Adam_Dev13-Sep-11 22:21
Adam_Dev13-Sep-11 22:21 
AnswerRe: Where to use Try/Catch block? Pin
BobJanova13-Sep-11 22:40
BobJanova13-Sep-11 22:40 
try { ... } catch { throw; }

... is by definition pointless. Are you logging within that catch block? I don't think you should do that, though, because it will result in exceptions getting double-logged.

I would say you should trap exceptions at the point where it makes sense to handle them. You can make an argument for that being in ValidateUser (any exception should be 'invalid' i.e. return false), or at the top level call which might produce one (at which time you log the error). But don't catch it in both places.

You should only throw an ArgumentNullException if the argument is actually null – if you want to fail on empty too, it should be an ArgumentException. But 'guards' at the top of a method like that are fine.
GeneralRe: Where to use Try/Catch block? [modified] Pin
Adam_Dev13-Sep-11 23:01
Adam_Dev13-Sep-11 23:01 
GeneralRe: Where to use Try/Catch block? Pin
BobJanova14-Sep-11 2:09
BobJanova14-Sep-11 2:09 
AnswerRe: Where to use Try/Catch block? Pin
Pete O'Hanlon13-Sep-11 22:57
mvePete O'Hanlon13-Sep-11 22:57 
GeneralRe: Where to use Try/Catch block? [modified] Pin
Adam_Dev13-Sep-11 23:10
Adam_Dev13-Sep-11 23:10 
GeneralRe: Where to use Try/Catch block? Pin
Pete O'Hanlon13-Sep-11 23:50
mvePete O'Hanlon13-Sep-11 23:50 
GeneralRe: Where to use Try/Catch block? Pin
Adam_Dev14-Sep-11 0:26
Adam_Dev14-Sep-11 0:26 
AnswerRe: Where to use Try/Catch block? Pin
Luc Pattyn14-Sep-11 2:11
sitebuilderLuc Pattyn14-Sep-11 2:11 
GeneralRe: Where to use Try/Catch block? Pin
BobJanova14-Sep-11 2:22
BobJanova14-Sep-11 2:22 
GeneralRe: Where to use Try/Catch block? Pin
Adam_Dev14-Sep-11 2:33
Adam_Dev14-Sep-11 2:33 
AnswerRe: Where to use Try/Catch block? Pin
Luc Pattyn14-Sep-11 2:51
sitebuilderLuc Pattyn14-Sep-11 2:51 
JokeArrayList Pin
Subodh Kumar Jain13-Sep-11 20:38
Subodh Kumar Jain13-Sep-11 20:38 
GeneralRe: ArrayList Pin
Wayne Gaylard13-Sep-11 21:04
professionalWayne Gaylard13-Sep-11 21:04 
GeneralRe: ArrayList Pin
PIEBALDconsult14-Sep-11 2:27
mvePIEBALDconsult14-Sep-11 2:27 
GeneralRe: ArrayList Pin
Pete O'Hanlon14-Sep-11 3:51
mvePete O'Hanlon14-Sep-11 3:51 
QuestionError in Custom IIS MMC SnapIn Page ...... Pin
Shazz_Shivang200413-Sep-11 20:23
Shazz_Shivang200413-Sep-11 20:23 
QuestionWho to write HTML code using Csharp Pin
amit_ghosh1813-Sep-11 8:20
amit_ghosh1813-Sep-11 8:20 
AnswerRe: Who to write HTML code using Csharp Pin
Eddy Vluggen13-Sep-11 8:33
professionalEddy Vluggen13-Sep-11 8:33 

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.