© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Casting and output - C#
C
C#
•
4y ago
•
2 replies
surwren
Casting and output
So take a basic example like
double avg = ((double)num1 + num2) / 2;
double avg = ((double)num1 + num2) / 2;
If you take the
(double
) cast out from num1
, avg won
't reflect the decimal point
.
Is there a google keyword I can search for more information on how to ascertain that my numbers will be reflected as I would like them to be
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
62,470
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Capturing process output via OutputDataReceived event
C
C# / help
3y ago
✅ Type Casting
C
C# / help
4y ago
Casting and Convert method in C#
C
C# / help
15mo ago
Casting types inline
C
C# / help
2y ago