473,471 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error in code after converting to VS.NET 2005?

Hi,

After converting my project from VS.NET 2003 to VS.NET 2005 I am receiving
the error:

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

For the line of code:

byte upperValue = (byte)Math.Floor(bytes[i]/16);

Thanks in advanced for any help,
Asaf

Feb 14 '06 #1
3 1983
Hi Asaf,

You're receiving this error because the compiler is not sure which overload
you're trying to use for the Floor method. In .NET framework 1.1, there is
only one overload for this while in .NET framework 2.0, there are two of
them. You can try the following

double d = bytes[i]/16;
byte upperValue = (byte)Math.Floor(d);

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Feb 14 '06 #2
Hi Kevin,

Thanks for your help :-)

Regards,
Asaf

"Kevin Yu [MSFT]" wrote:
Hi Asaf,

You're receiving this error because the compiler is not sure which overload
you're trying to use for the Floor method. In .NET framework 1.1, there is
only one overload for this while in .NET framework 2.0, there are two of
them. You can try the following

double d = bytes[i]/16;
byte upperValue = (byte)Math.Floor(d);

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Feb 14 '06 #3
You're welcome!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Feb 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Zibi | last post by:
I have some problem with datatime. SELECT * FROM stat WHERE data > '2005-05-24 14:07:28' ORDER BY id Asc I got the error: Microsoft OLE DB Provider for SQL Server error '80040e07' The...
1
by: amitbadgi | last post by:
Welcome back amitbadgi | Logout | Faq Knowledge Discovery Keys COMPUTER PROGRAMMING, DATA MINING, STATISTICS, ARTIFICIAL INTELLIGENCE * Settings * Photos * Lists * MVPs * Forums * Blogs
9
by: Michael Tissington | last post by:
After converting from 6.0 to 2005 when I try to Compile my project I'm getting a LINK error Error 1 fatal error LNK1181: cannot open input file " ?/.obj" Any ideas how to fx this please ? ...
0
by: rajmgopal | last post by:
Hello Everyone I am getting the following error when i try to insert a record into Sql Server 2005 from my VB 2005 application. sqlEx = {"Error converting data type numeric to numeric."} I...
2
by: Sugan | last post by:
Hi All, I have a peculiar kind of issue after converting VC and VB code from Visual studio 6.0 to Visual Studio 2005. We have the business logic in the VC code which uses the ATL framework...
0
by: Sugan | last post by:
Hi All, I have a peculiar kind of issue after converting VC and VB code from Visual studio 6.0 to Visual Studio 2005. We have the business logic in the VC code which uses the ATL framework...
5
by: marathoner | last post by:
I am in the process of converting a Visual C++ 6.0 project to Visual Studio 2005. The conversion is almost complete, but in the linking phase, I get the error: LINK : fatal error LNK1104:...
5
by: PLS | last post by:
I'm converting some C++ code to VC++ 2005 in native (non-managed) mode. This code doesn't use ATL, but codes the COM mechanisms directly. It has a class which is the equivalent of ATL's...
3
by: misu101 | last post by:
Hi, I have an application that defines a hash_set as: typedef hash_set<const char*, hash<const char*>, chunker_eqstr> StringSet; This code compiles OK with VS6 and SGI STL library. It is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.