Last post Jan 07, 2015 03:11 AM by oned_gk
Jan 06, 2015 11:34 PM|wavemaster|LINK
I am having difficulty convincing VS that what I am trying to do is perfectly acceptable.
The problem originates with data uncertainty and an elaborate contraption to figure out what data was received on how it needs to manipulated. Basically running it through a sieve
The test data is designed to meet condition 1b2.
The int.tryparse fails and the code ends up where I have shown the arrow.
I am thinking:
1. at that point it should finish the condition 1b1 block
2. and head for the else block 1b2.
I can see VS hitting the closing } for 1b1 (where the arrow is), it should now hit the else branch
test condition 1
if condition 1a
if condition 1b1
try.Parse if true ...==>
else condition 1b2
test condition 2
more of the above with several try catch constructs
Instead it skips all of that and ends at test condition 2.
Like that else isn't even there.
Jan 07, 2015 03:11 AM|oned_gk|LINK
If im not wrong undertand your question
int.tryparse is always success for parent try cacth
try - cacth is always success for parent try catch
to make fail use int.parse