473,378 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How can I do meth operations on UInt64?

Hi,
I have 2 UInt64 to add and then divide the result by another value. How can
I do this? because the math operators have not been defined for UInt64.

Can somebody help please?

Thanks

ThunderMusic
Aug 10 '05 #1
3 2194
ThunderMusic,
It sounds like you are using VB.NET 2002 or 2003, have you considered using
C# to perform the UInt64 math? Possibly a C# Class Library that your VB
project calls.

VB.NET 2005, due out later in 2005, adds full support for unsigned integers
(UInt16, UInt32, and UInt64).

http://lab.msdn.microsoft.com/vs2005/

Hope this helps
Jay
"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
| Hi,
| I have 2 UInt64 to add and then divide the result by another value. How
can
| I do this? because the math operators have not been defined for UInt64.
|
| Can somebody help please?
|
| Thanks
|
| ThunderMusic
|
|
Aug 10 '05 #2
Hi,
I didn't know the functions were different from VB to C#... I thought that
was the same framework, so the same functionnalities... is there no way to
do math operations on UIn64 other than a C# class library? And yes, I'm
using VB.NET 2003.

Thanks for your answer, In fact if it is absolutely not possible to do math
operations on UInt64 from VB.NET 2003, I will do my class library in C#
(cause my project using these operations is a class library)

By the way, if I load my class libraries using reflection, does it matter if
the class library is programmed in VB.NET or C#? (the loading core project
is in VB.NET)

Thanks again
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> a écrit dans le
message de news:%2****************@tk2msftngp13.phx.gbl...
ThunderMusic,
It sounds like you are using VB.NET 2002 or 2003, have you considered using C# to perform the UInt64 math? Possibly a C# Class Library that your VB
project calls.

VB.NET 2005, due out later in 2005, adds full support for unsigned integers (UInt16, UInt32, and UInt64).

http://lab.msdn.microsoft.com/vs2005/

Hope this helps
Jay
"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
| Hi,
| I have 2 UInt64 to add and then divide the result by another value. How
can
| I do this? because the math operators have not been defined for UInt64.
|
| Can somebody help please?
|
| Thanks
|
| ThunderMusic
|
|

Aug 10 '05 #3
ThunderMusic,
Yes the framework itself is the same, however math operations on Int32 &
UInt32 are performed at the IL level, not the Framework. The C# knows &
emits the IL for UInt32, while VB (until VB 2005) doesn't know about UInt32
& doesn't emil the IL.

You are however free to declare & use UInt32 variables, however you simply
won't have any operators.

| By the way, if I load my class libraries using reflection, does it matter
if
| the class library is programmed in VB.NET or C#? (the loading core project
| is in VB.NET)
It shouldn't matter. I have not seen nor heard of anyplace where it
mattered.

Hope this helps
Jay

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
| Hi,
| I didn't know the functions were different from VB to C#... I thought
that
| was the same framework, so the same functionnalities... is there no way
to
| do math operations on UIn64 other than a C# class library? And yes, I'm
| using VB.NET 2003.
|
| Thanks for your answer, In fact if it is absolutely not possible to do
math
| operations on UInt64 from VB.NET 2003, I will do my class library in C#
| (cause my project using these operations is a class library)
|
| By the way, if I load my class libraries using reflection, does it matter
if
| the class library is programmed in VB.NET or C#? (the loading core project
| is in VB.NET)
|
| Thanks again
|
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> a écrit dans le
| message de news:%2****************@tk2msftngp13.phx.gbl...
| > ThunderMusic,
| > It sounds like you are using VB.NET 2002 or 2003, have you considered
| using
| > C# to perform the UInt64 math? Possibly a C# Class Library that your VB
| > project calls.
| >
| > VB.NET 2005, due out later in 2005, adds full support for unsigned
| integers
| > (UInt16, UInt32, and UInt64).
| >
| > http://lab.msdn.microsoft.com/vs2005/
| >
| > Hope this helps
| > Jay
| >
| >
| > "ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
| > news:Ok**************@tk2msftngp13.phx.gbl...
| > | Hi,
| > | I have 2 UInt64 to add and then divide the result by another value.
How
| > can
| > | I do this? because the math operators have not been defined for
UInt64.
| > |
| > | Can somebody help please?
| > |
| > | Thanks
| > |
| > | ThunderMusic
| > |
| > |
| >
| >
|
|
Aug 10 '05 #4

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

Similar topics

0
by: Matt Creely | last post by:
I'm creating a DTS package to import some data from our HP3000, using the minisoft odbc driver as a linked server within sql server. I'm importing a table from the HP3000 (which I've done lots of...
2
by: donbro | last post by:
If my read of the extension source (Mac/Modules/file/_Filemodule.c) is correct, the parameter sizes specified for data and resource file sizes are UInt32 where they should be UInt64. In both OS9...
12
by: Wolfgang Kaml | last post by:
Dear all, I am using the following code to retrieve the size of a certain file and the available (free) space on the disk. The problem is, that I get the size of the file returned as a Long and...
1
by: John Smith | last post by:
Hello Whenever I try to set a value of a System.UInt64 I get: Dim var1 As System.UInt64 = &H18B377544DD23334 Error BC30311: Value of type 'Long' cannot be converted to 'System.UInt64'. ...
8
by: Kevin | last post by:
Dim X as int32 Dim Y as int64 X = Y / 1024 gives me the error: "Operator is not valid for type 'UInt64' and type 'Integer'." I'm new to VB.NET and this is one of the reasons why I've...
3
by: ThunderMusic | last post by:
Hi, I have 2 UInt64 to add and then divide the result by another value. How can I do this? because the math operators have not been defined for UInt64. Can somebody help please? Thanks ...
21
by: ashish.sadanandan | last post by:
Hi, I haven't done a lot of C++ programming (done a lot of it in C) and the reason why I'm considering switching now is also the question I'm posting here. I have some library functions that...
9
by: Sanjib Biswas | last post by:
Could anyone point out to me the difference between ulong (C#) and UInt64/ULong (VB.Net)? I was under the impression that both are same. Below C# code works fine for a particular value of 'data'...
5
by: stuie_norris | last post by:
Hi Group I am trying to write a method to unpack a byte array into an Uint64. But the results are wrong. public static void UnpackUint64(ref UInt64 dst, byte Data, ref uint Index) { dst =...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.