keitsi Posted April 25, 2004 Posted April 25, 2004 cMyCmd.vb(24): Operator '<>' is not defined for types 'System.UInt32' and 'System.UInt32'. This is not a problem, it's easily skipped by converting them to Int64's... but I'm just wondering what's the cause of this :P I don't get it :) You can't compare two integers of the same type, but you can first convert them to signed 64bit and then compare. Anyone else bumped to this? Quote BS - Beer Specialist
Leaders dynamic_sysop Posted April 25, 2004 Leaders Posted April 25, 2004 you can use the Equals method ( also there's a CompareTo method , which returns -1 for False , or 0 for True ) Dim uint1 As UInt32 = Convert.ToUInt32(123) Dim uint2 As UInt32 = Convert.ToUInt32(123) Dim bResult As Boolean = uint1.Equals(uint2) '/// compare the 2 UInt32's using Equals MessageBox.Show(bResult) Quote
*Experts* mutant Posted April 26, 2004 *Experts* Posted April 26, 2004 Do you have any reason for using UInt32? Its not a CLS compliant data type. Quote
keitsi Posted April 26, 2004 Author Posted April 26, 2004 Thanks, didn't notice that function. Do you have any reason for using UInt32? Yes, I'm working with libMySQL.dll which returns uints. Haven't tried though if Int64s work (return values will get screwed?). Quote BS - Beer Specialist
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.