Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unsigned integers 3

Status
Not open for further replies.

Ruffnekk

Programmer
Aug 2, 2005
249
DE
I've written a FAQ about working with and understanding unsigned integers in VB .NET for those who have encountered difficulties with it (like me in the past). I'm curious to see if anyone has some additional notes or corrections to it.

Regards, Ruffnekk
---
Is it my imagination or do buffalo wings taste just like chicken?
 
If you are to tip us about an faq you could paste the link to it while your at it :D

- - - - - - - - - - - - - - - - - -
Im three apples high, Im blue, and i most certainly like that cold beer that should be every mans right after a hard days work!
 
Nice work, have a twinkle

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Nicely done! In your IntegerToUint16 function, I think you mean to check:
Code:
If value < 2 ^ 16 Then
rather than:
Code:
If value < 2 ^ 16 - 1 Then

Have a great day!

j2consulting@yahoo.com
 
Thank you for the correction SBendBuckeye! And also for the FAQ comment you gave me. I've added your suggestions to it now. Have a nice day,

Regards, Ruffnekk
---
Is it my imagination or do buffalo wings taste just like chicken?
 
You can use the .net convert class to convert datatypes.
uints -> ints
ints -> uints.
You get an overflow exception when the numbers don't fit into the target type.
Convert.toInt32(some UInt)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top