About 5,770,000 results
Open links in new tab
  1. How do I convert a decimal to an int in C#? - Stack Overflow

    Feb 1, 2009 · This solution will return the maximum or minimum int value possible if the decimal value is outside the int range. You might want to add some rounding with Math.Round, Math.Ceiling or …

  2. How to Convert a Decimal Number to an Integer in Programming

    Learn how to effectively convert decimal numbers to integers in various programming languages. Explore examples, common mistakes, and solutions.

  3. Convert Double to Integer in Java - GeeksforGeeks

    2 days ago · Given a double value, the task is to convert it into an int in Java. Since double supports decimal values and int does not, the fractional part is handled differently depending on the …

  4. CConvert Decimal to Int: A Complete Guide - HatchJS.com

    We first covered the basics of decimal and integer data types, and then we presented three different methods for converting a decimal to an integer. We concluded by providing some tips for choosing …

  5. C# Casting Decimal to Integer: A Complete Guide - Web Dev Tutor

    Jul 22, 2024 · Casting a decimal to an integer might seem straightforward, but there are nuances to consider to ensure accuracy and efficiency. In this guide, we will explore various methods and best …

  6. Tutorial: How to use integer and floating point numbers in C#

    Dec 11, 2025 · Integer division always produces an integer result, even when you'd expect the result to include a decimal or fractional portion. If you didn't see this behavior, try the following code:

  7. How Can You Convert a Decimal to an Integer in a Decimal String?

    Learn how to convert decimal numbers to integers within a decimal string quickly and accurately. Explore step-by-step methods and tips for handling decimal-to-integer conversion in programming …

  8. casting - C convert floating point to int - Stack Overflow

    Jul 13, 2014 · anything that has a decimal point is going to be handled as float or larger. The way to get the value is either the lib function int floor (float) or (for roundingup) int ceil (float).

  9. C# `Decimal.ToInt32 ()`: Converting Decimal to Integer with Truncation

    This tutorial explains the conversion process (truncation), demonstrates its usage with code examples, and highlights its applications in various programming scenarios.

  10. Number System Conversion in C - GeeksforGeeks

    Jul 23, 2025 · Number system conversion is a fundamental concept in computer science and programming. It involves changing the representation of a number from one base to another, such as …