C
C#2y ago
AideedSS

❔ ✅ Why is this true?

I want to check as if file.Length less than 10000..but why do the expression is true, file.Lenght is more than 10000
40 Replies
ero
ero2y ago
it isn't
AideedSS
AideedSSOP2y ago
yeah, exactly...what when wrong with the code? if it is false, then the debug would turn red
ero
ero2y ago
i don't know, you're not really telling us what's happening
AideedSS
AideedSSOP2y ago
okay, the code is
if(file.Length < 10000){
continue;
}
if(file.Length < 10000){
continue;
}
based on the picture I mention, it represent file.Length is 1493519..which is more than 10000.. Supposedly, it will be false, yet it turns out true.. My question is why? and how to solve this? _ wait, you guys can see the picture I gave right? because, the picture explains everything that I dont even need to put any description 😆 That would be awkward if you don't gets the picture hahaha
SG97
SG972y ago
does it actually enter the if clause
ero
ero2y ago
it doesn't turn out true, that's just not possible
AideedSS
AideedSSOP2y ago
exactly yep...it does..I dont want it to turn true..I want that scenario goes false
AideedSS
AideedSSOP2y ago
AideedSS
AideedSSOP2y ago
take a look on this picture
SG97
SG972y ago
can you provide some proof
ero
ero2y ago
it cannot enter the if clause. that is not possible.
Cattywampus
Cattywampus2y ago
you're iterating there, so you're not just comparing 1 string
AideedSS
AideedSSOP2y ago
wait? compare string? I made a condition between both are value.. 😕
ero
ero2y ago
they didn't read your code right you're fine
AideedSS
AideedSSOP2y ago
In case you don't know, Visual Studio .NET will made debug info red if it is false
ero
ero2y ago
no it doesn't?
AideedSS
AideedSSOP2y ago
hahaha, then how to make them right? hahaha 😆
SG97
SG972y ago
what are you talking about if you're looking at local variables, the red indicates it's changed this is assuming we're talking about the same thing but on the matter at hand, can you provide a screenshot where it actually enters the if clause
AideedSS
AideedSSOP2y ago
I mean this
SG97
SG972y ago
changed, not true/false
ero
ero2y ago
what part of that indicates true or false lol
Buddy
Buddy2y ago
Buddy
Buddy2y ago
This means it HIT that logic check it does not mean it evaluates to true
AideedSS
AideedSSOP2y ago
I mean, take a look down there..not there haha
SG97
SG972y ago
all I want to see is you running to line 53 and showing the local variables
AideedSS
AideedSSOP2y ago
AideedSS
AideedSSOP2y ago
alright, wait
Buddy
Buddy2y ago
Nothing here states that it evaluates to true
AideedSS
AideedSSOP2y ago
SG97
SG972y ago
?
Buddy
Buddy2y ago
set a breakpoint at line 54
ero
ero2y ago
i'm about to explode
SG97
SG972y ago
lmao
AideedSS
AideedSSOP2y ago
alright
Buddy
Buddy2y ago
If it does break at line 54, that means that condition evaluates to true, otherwise it would not have hit that breakpoint.
AideedSS
AideedSSOP2y ago
thats weird, it skips rarararara.pdf(you can see the filename down there) but when I remove if clause, it does run along with rararrarara.pdf
SG97
SG972y ago
why would that be?
AideedSS
AideedSSOP2y ago
AideedSS
AideedSSOP2y ago
ohhh, i figure it out thanks for helping...the issue is the below codes...
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server