© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
lugende

why does this Not work?

double d, calc;
d = convert.ToDouble(textBox1.Text);
calc = math.Round(d, 0);
if (d = calc) *1
{
textBox2.Text(„its a integer“)
}



*1 I HAVE AN ERROR HERE BECAUSE I CANT IMPLEMENT BOOL IN DOUBLE

Its Not about because i spelled sm wrong, im just on mobile and couldnt copy past my code 1:1 and just coded it like i rememberd, if there so sm spelled wrong, its will be 99% sure spelled right in my code in Visual Studio on Pc

If you have a better way for me to check if a number is an integer or has an x.5 at the ending you would also help me if you can explain it to me
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

❔ Why does this not work?
C#CC# / help
3y ago
❔ ✅ Why does this not work???
C#CC# / help
3y ago
why does this code not work???
C#CC# / help
3w ago
Why does this not work? [Answered]
C#CC# / help
4y ago