DR00ME Posted March 4, 2004 Posted March 4, 2004 what's max and min values of this variable type ? Quote "Everything should be made as simple as possible, but not simpler." "It's not that I'm so smart , it's just that I stay with problems longer ." - Albert Einstein
Administrators PlausiblyDamp Posted March 4, 2004 Administrators Posted March 4, 2004 MessageBox.Show(UInt32.MaxValue.ToString()); MessageBox.Show(UInt32.MinValue.ToString()); gives 4294967295 and 0 respectively. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
*Experts* mutant Posted March 4, 2004 *Experts* Posted March 4, 2004 Keep in mind that UInt32 is no CLS compliant, so the use is discouraged. Read about that topic more here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconwhatiscommonlanguagespecification.asp Quote
DR00ME Posted March 4, 2004 Author Posted March 4, 2004 Well some of my application variables are using values from 0 to ~ 80000 ...and I was thinking if Uint16 would take less memory than Integer.... what do you think ? Quote "Everything should be made as simple as possible, but not simpler." "It's not that I'm so smart , it's just that I stay with problems longer ." - Albert Einstein
Administrators PlausiblyDamp Posted March 4, 2004 Administrators Posted March 4, 2004 Probably not worth the tradeof, a normal int (Int32) is CLS compliant and only a couple of bytes more. Unless you are allocating large amounts of them at once I wouldn't bother personally. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
DR00ME Posted March 4, 2004 Author Posted March 4, 2004 Ok thx I think I'll stick with the old fashioned way! Quote "Everything should be made as simple as possible, but not simpler." "It's not that I'm so smart , it's just that I stay with problems longer ." - Albert Einstein
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.