Why...
-
I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...
Sorry, my english is bad!
-
That's not too bad. Bad, certainly, but I'm not impressed yet. You said this isn't the worst - what is?
-
I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...
Sorry, my english is bad!
Moykn wrote:
object.Property = true ? "1":"0";
Surely that's
object.Property == true ? "1" : "0";
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
Just shake your head back and forth in disbelief and move on. Try not to think about the abominations you see in someone elses code because there are a LOT of them out there.
A guide to posting questions on CodeProject[^]
Dave KreskowiakDave Kreskowiak wrote:
Try not to think about the abominations you see in someone elses code because
....there's probably a lot in your code too... :-D
-
Dave Kreskowiak wrote:
Try not to think about the abominations you see in someone elses code because
....there's probably a lot in your code too... :-D
Entirely possible! :laugh:
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Looks like forgotten to reset "hard debugging changes".
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb
Yeah, looks like debug code that's somehow stayed in the main repo...
-
Moykn wrote:
did you mind making pagination using a foreach and 2 counters?
<Hands over ears>LA LA LA LA LA LA I CAN'T HEAR YOU LA LA LA LA LA LA</Hands over ears>
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Moykn wrote:
object.Property = true ? "1":"0";
Surely that's
object.Property == true ? "1" : "0";
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easierPete O'Hanlon wrote:
Surely that's
object.Property == true ? "1" : "0";
You're correct, and don't call me Shirley! :)
It was broke, so I fixed it.
-
Entirely possible! :laugh:
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Moykn wrote:
object.Property = true ? "1":"0";
Surely that's
object.Property == true ? "1" : "0";
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easierLooked OK to me. Silly, but OK.
-
Moykn wrote:
object.Property = true ? "1":"0";
Surely that's
object.Property == true ? "1" : "0";
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
nope.. what have to be done is set "property" not evaluate its value.
Sorry, my english is bad!
Then that makes even less sense. So, this code is evaluating true and assigning the result back. Okey dokey.
I was brought up to respect my elders. I don't respect many people nowadays.
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier -
I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...
Sorry, my english is bad!
Because this:
valueReturn = (3 * 60).ToString();
means 3 minutes, but this:
valueReturn = "180";
means the opposite.
-
I was looking into some code at work and came across this valueReturn = ( 3 * 60 ).ToString(); and something like this object.Property = true ? "1":"0"; and just want to know, why...
Sorry, my english is bad!
OMG! WTF??!! :omg: :wtf: :mad: :sigh: :(( :~ X|
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein