Search
Setup for Free
C
C#
•
3y ago
Mitch
✅ How can an error occur inside an if statement when the condition doesn't == true?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,206
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
M
Mitch
OP
•
5/9/23, 2:26 PM
I am baffled how i
'm getting an exception inside of this if statement
. I
'm null checking the value first
.
M
Mitch
OP
•
5/9/23, 2:27 PM
Is it something to do with recursion that I
'm not understanding
?
S
sibber
•
5/9/23, 2:32 PM
put a breakpoint on the if statement and try to repro
M
Mitch
OP
•
5/9/23, 2:33 PM
I
'll have to google that
. I don
't know what a breakdown is
S
sibber
•
5/9/23, 2:34 PM
breakpoint
M
Mitch
OP
•
5/9/23, 2:34 PM
oh
. i do have one
M
Mitch
OP
•
5/9/23, 2:34 PM
checkout the screenshot
. it says its null
, but the code has an error inside
.
S
sibber
•
5/9/23, 2:34 PM
oh yeah i just saw it
M
Mitch
OP
•
5/9/23, 2:34 PM
i figured it was somehting I don
't understand
S
sibber
•
5/9/23, 2:34 PM
well how did it throw on that line if the breakpoint wasnt hit
M
Mitch
OP
•
5/9/23, 2:34 PM
no kidding
.
M
Mitch
OP
•
5/9/23, 2:35 PM
i put a breakpoint if webField
=
= null
S
sibber
•
5/9/23, 2:35 PM
i asumme the debugger bugged out
M
Mitch
OP
•
5/9/23, 2:35 PM
i restarted VS
. still just trying random stuff for now
S
sibber
•
5/9/23, 2:35 PM
or some pdb is old
M
Mitch
OP
•
5/9/23, 2:35 PM
attempting clean
S
sibber
•
5/9/23, 2:35 PM
try deleting obj and bin
S
sibber
•
5/9/23, 2:35 PM
manually
M
Mitch
OP
•
5/9/23, 2:35 PM
oh dern i always forget that
M
Mitch
OP
•
5/9/23, 2:36 PM
running again
M
Mitch
OP
•
5/9/23, 2:36 PM
I should know its always the simple things when its
this
odd
M
Mitch
OP
•
5/9/23, 2:36 PM
thanks
S
sibber
•
5/9/23, 2:36 PM
did it work
?
M
Mitch
OP
•
5/9/23, 2:37 PM
yep
S
sibber
•
5/9/23, 2:37 PM
nice
Similar Threads
Can't access local variable inside an if...else statement [Answered]
C
C# / help
4y ago
Why are out parameters inside an if statement condition not local to the if block? [Answered]
C
C# / help
4y ago
if statement always returns true
C
C# / help
11mo ago
✅ How To Return 2 numbers inside of an If/Else statement
C
C# / help
3y ago