Skip to content

What is the meaning of this error in C#.net?

Asked Aug 24, 2007, 10:52 PM EDT1 answer
Share
LinkedInX
what is the meaning of this error in C#.net?
  Posted on: 8/25/2007 2:47:33 AM

This is my program line:
short nHalf = (short)Math.Floor(nDegree/2);

whn i run my application it shows error on the above line in c#.net...

Error Name:

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

 


 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    The meaning is as it's said, ambigius call to function which is defined aas Math.Floor(decimal) and Math.Floor(double). Compiler can not resolve your call and decide which one to use. To get rid of this error cast your result to decimal or double as short nHalf = (short)Math.Floor((double)nDegree / 2);
    0