© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
8 replies
EGGET

Need help with if function

Hello, Im a beginner in C# and I need help with my code.

I don't want line 99 to write out anything if coffee is false but it stills write out "Coffee = 0kr".

How does the if function works here?
Is it not working because of line 97 I got totalCoffeePrice?

Thanks in advanced!
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Need help with a function
C#CC# / help
13mo ago
✅ Need help with an if statement
C#CC# / help
3y ago
Need help creating a function
C#CC# / help
3y ago
I need help with a button function in WinForms
C#CC# / help
3y ago