Click here to Skip to main content
15,880,503 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Rob Philpott1-Apr-14 6:51
Rob Philpott1-Apr-14 6:51 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Eddy Vluggen1-Apr-14 9:11
professionalEddy Vluggen1-Apr-14 9:11 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Eddy Vluggen1-Apr-14 6:56
professionalEddy Vluggen1-Apr-14 6:56 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 7:56
mveOriginalGriff1-Apr-14 7:56 
GeneralRe: Multiple try blocks in c# 2.0 Pin
BobJanova1-Apr-14 23:29
BobJanova1-Apr-14 23:29 
AnswerRe: Multiple try blocks in c# 2.0 Pin
Deflinek1-Apr-14 5:15
Deflinek1-Apr-14 5:15 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 8:25
mveOriginalGriff1-Apr-14 8:25 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Deflinek1-Apr-14 23:51
Deflinek1-Apr-14 23:51 
I'm sorry, I wasn't clear enough Smile | :) You are absolutely right that if method expects certain format for arguments to do its job should throw an exception if they are not valid.
In my post I was refering to OP's code when he calls validation method, then check for result and throws exception for certain values but catches it later in the same method. and continue processing. This is pure evil in my opinion Smile | :)

My point was - throw an exception only if you can't handle the situation inside the method and only if it's... exceptional situation. Do not use exception to control the flow.
--
"My software never has bugs. It just develops random features."

GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff2-Apr-14 0:04
mveOriginalGriff2-Apr-14 0:04 
AnswerRe: Multiple try blocks in c# 2.0 Pin
GuyThiebaut2-Apr-14 2:20
professionalGuyThiebaut2-Apr-14 2:20 
QuestionHow to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 0:30
taibc1-Apr-14 0:30 
AnswerRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Simon_Whale1-Apr-14 1:18
Simon_Whale1-Apr-14 1:18 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 15:47
taibc1-Apr-14 15:47 
AnswerRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Wayne Gaylard1-Apr-14 1:21
professionalWayne Gaylard1-Apr-14 1:21 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 15:47
taibc1-Apr-14 15:47 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Simon_Whale1-Apr-14 22:40
Simon_Whale1-Apr-14 22:40 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc2-Apr-14 17:59
taibc2-Apr-14 17:59 
Questionhow i can remove the current row..? the record is not yet saved on the database..the remove button is exist in every row of a repeater.. Pin
Member 1058077031-Mar-14 23:14
Member 1058077031-Mar-14 23:14 
QuestionC# new tab dynamic Pin
antrock10131-Mar-14 23:09
antrock10131-Mar-14 23:09 
AnswerRe: C# new tab dynamic Pin
Richard MacCutchan31-Mar-14 23:30
mveRichard MacCutchan31-Mar-14 23:30 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 0:02
antrock1011-Apr-14 0:02 
GeneralRe: C# new tab dynamic Pin
Richard MacCutchan1-Apr-14 0:28
mveRichard MacCutchan1-Apr-14 0:28 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 2:03
antrock1011-Apr-14 2:03 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 2:37
antrock1011-Apr-14 2:37 
GeneralRe: C# new tab dynamic Pin
Eddy Vluggen1-Apr-14 5:02
professionalEddy Vluggen1-Apr-14 5:02 

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.