You already got the answer, no need to deal with the decimals if you assign it to an integer.
In your comment you say that you are working with decimals, then Math.Floor is a possibility. ie:
double d = Math.Floor(81.0 / 80.0); // 1.0000...
Related Posts:
- Convert HTML to PDF in .NET
- C# HttpClient An existing connection was forcibly closed by the remote host
- What is the { get; set; } syntax in C#?
- Can anyone explain IEnumerable and IEnumerator to me? [closed]
- IOException: The process cannot access the file ‘file path’ because it is being used by another process
- Error : Index was outside the bounds of the array.
- No connection could be made because the target machine actively refused it?
- What does a lock statement do under the hood?
- What is C# equivalent of
- What are the benefits to marking a field as `readonly` in C#?
- How to resolve “Input string was not in a correct format.” error?
- failed to load resource: the server response with a status 500 (internal server error)
- C# compiler error: “not all code paths return a value”
- ASP.NET 5 MVC: unable to connect to web server ‘IIS Express’
- Why is this code throwing an InvalidOperationException?
- How to add a default Default.aspx to a ASP.NET Web Application Project?
- Regex for numbers only
- Access to the path is denied
- What does question mark and dot operator ?. mean in C# 6.0?
- How to jump in Unity 3d?
- The client and server cannot communicate, because they do not possess a common algorithm – ASP.NET C# IIS TLS 1.0 / 1.1 / 1.2 – Win32Exception
- ToList().ForEach in Linq
- Cannot implicitly convert type ‘customtype’ to ‘othercustomtype’
- Metadata file ‘.dll’ could not be found
- Proper way to initialize a C# dictionary with values
- Easiest way to alter eBay page content/DOM
- Why does var evaluate to System.Object in “foreach (var row in table.Rows)”?
- MSHTML DLL on Windows 10
- Unity 2d jumping script
- Get dictionary value by key
- Invalid URI: The format of the URI could not be determined
- Unity “The associated script can not be loaded” and “Win32Exception: The system cannot find the file specified”
- Convert Linq Query Result to Dictionary
- Get single value from dictionary by key
- What is the difference between “@Scripts.Render” and “
Recommended Hostings
Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.
FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.