C
C#11mo ago
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
2 Replies
Jimmacle
Jimmacle11mo ago
what does = do?
Honza K.
Honza K.11mo ago
Equality operators - test if two objects are equal or not equal - C#
C# equality operators test if two objects are equal or not equal. You can define equality operators for your types for custom comparisons for equality
Want results from more Discord servers?
Add your server