How Sharp is Your C#? | Riddle #2
Vložit
- čas přidán 9. 05. 2023
- In today's video, we'll break down a short riddle that almost everyone guessing the correct answer out of 4 possible answers got wrong.
This riddle is all about the implicit operator in C#. Hope you enjoy it!
Connect with me on 'em socials:
Twitter: / amantinband
LinkedIn: / amantinband
GitHub: github.com/amantinband - Věda a technologie
58
Because that's the answer I was gonna write, I know that you're wrong!
Great one! More riddles, please 😃
Good devs should be able to run short snippets of code in 🧠
I got right at very first time and now answer is 58.
That was a great riddle. It shows what possible dangers can come from implicit operators if you don’t pay attention.
Great, short video. Sadly, I got it wrong. Also a great show case of why we should be explicit in our code. Please don't write code like this! 😂
19 x 3 +1 I didn't know all this ! Excellent Amichai as always !! As improvement, i think it would have been interesting to see the percentage for each of the answer :)
implicit methods/operators are great until they’re abused recklessly and you have to debug them
Yep
didn't know about the "automatic" conversion of value in a Foo object!
gotta be 58 since nothing really changed after you just explained what tricked many of us and just repeats that nasty operation x)
i thought i got it right until you said 19 and realized i didnt see the operator returns a Foo again haha
Haha 💪🏼
(19 * (2+1)) + 1 = 58 would be my solution
61?
I knew you can should to your leg by using implisit operator but this is like way beyond common sense
58