+ 1
C#Love chat-3
Give a heart to Mandy. Can I change a case if (answer == "yes") {PrintHeart();} else {WriteLine("Mandy is crying!");} To case with "?" operator? https://code.sololearn.com/cdzOdPkCRwth/?ref=app
1 Antwort
+ 1
No as PrintHeart and WriteLine returns void
If you want to fix that, makes PrintHeart return an int for example and wrap WriteLine in another function