There are all sorts of methods to convert decimal numbers to integers that behave in various ways. Decimal.Floor or Decimal.Truncate are what you want. Note that Floor rounds towards negative infinity while truncate rounds towards zero, e.g.
Note that both those methods return a Decimal object, so you would still need to convert it to an Integer object if that is the type you need. You can use CInt but I would use Convert.ToInt32.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.