© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
101 replies
elmish

✅ comparing variable to a number

im very very very new to C# and im trying to recode some basic things i made in python but i cant seem to figure out how to compare a variable like B to a number like 60
im trying to do
if (b) == 60;
if (b) == 60;
but its giving me:
Invalid expression term '=='
Invalid expression term '=='
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Next page

Similar Threads

replace variable with random number
C#CC# / help
2y ago
How to set a variable = to itself + another variable
C#CC# / help
2y ago
✅ comparing variables
C#CC# / help
9mo ago
❔ comparing classes
C#CC# / help
3y ago