Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Math.Round() ambiguity problem

Math.Round() ambiguity problem

Scheduled Pinned Locked Moved C#
help
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muammar
    wrote on last edited by
    #1

    Math.Round(shortValue / intValue);

    Error 1 The call is ambiguous between the following methods or properties: 'System.Math.Round(double)' and 'System.Math.Round(decimal)'


    Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

    M 1 Reply Last reply
    0
    • M Muammar

      Math.Round(shortValue / intValue);

      Error 1 The call is ambiguous between the following methods or properties: 'System.Math.Round(double)' and 'System.Math.Round(decimal)'


      Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

      M Offline
      M Offline
      mike montagne
      wrote on last edited by
      #2
      Math.Round( ( double )shortValue / ( double )intValue );
      
      M 1 Reply Last reply
      0
      • M mike montagne
        Math.Round( ( double )shortValue / ( double )intValue );
        
        M Offline
        M Offline
        Muammar
        wrote on last edited by
        #3

        Thanx again Mike:)


        Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

        M 1 Reply Last reply
        0
        • M Muammar

          Thanx again Mike:)


          Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

          M Offline
          M Offline
          mike montagne
          wrote on last edited by
          #4

          You're welcome. This is a basic type-relevant issue. Math cannot be taken for granted, so you probably want to heed Luc's advice if it affects your process.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups