473,387 Members | 3,801 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,387 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 2195
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: 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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.