2 Replies - 400 Views - Last Post: 06 October 2012 - 02:09 AM Rate Topic: -----

#1 krakatoa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 30
  • Joined: 04-October 12

Rounding

Posted 06 October 2012 - 01:21 AM

Hello. I need to convert decimal to int and convert always to upper value. For example decimal will be 4.12 and int should be 5. Do you have any solutions.
Thank you.
Is This A Good Question/Topic? 0
  • +

Replies To: Rounding

#2 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1010
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: Rounding

Posted 06 October 2012 - 01:29 AM

Math.Ceiling() will do it. There are two versions, one for decimal and one for double. Link goes to decimal since that's what you said in your post.
Was This Post Helpful? 0
  • +
  • -

#3 krakatoa  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 30
  • Joined: 04-October 12

Re: Rounding

Posted 06 October 2012 - 02:09 AM

Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1