Solved

Convert.ToUInt32

Posted on 2006-06-20
4
300 Views
Last Modified: 2010-04-23
All,

I am trying to use this method that requires the data being sent in to be converted to UInt32.  However, every time I use Convert.ToUIn32() I get an error saying the string is not in the correct format.  Can anyone provide any type of guidance on this command.  I have only used it once for a very minor project.  Thanks.

Jason
0
Comment
Question by:ammotroop
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Swapnil Piparia
ID: 16940936
Hi ammotroop,

Have you debug it, means have u checked what value string contains which you are going to convert to UInt32. If it contains any alpha characters or it contains the value which is out of range of UInt32?

Regards,
NetSwap
0
 
LVL 1

Author Comment

by:ammotroop
ID: 16940991
Well, lets say that I am trying to convert "3".  It gives me an error.  If I just use 3 it gives me an error.  For some reason each time I use it just keeps giving me the same error.

????

I am sure it is something easy but my brain is so fried right now that I can not even think.

Jason
0
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 16941555
I just did a test using the following, and everything came out fine.  What version of VS are you running?  And can you post the code that you're using that is trying to convert?

        Dim uintTest As UInt32
        uintTest = Convert.ToUInt32(3)
        uintTest = Convert.ToUInt32(CInt("3"))
0
 
LVL 1

Author Comment

by:ammotroop
ID: 16977927
I running VB.Net 2005 Express Edition.

I have found out that UInt32 is not the correct parameter even though that is what it says on MSDN.  The correct info should have been in string format.  Got it working.  But thanks for the help.

Jason
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help parsing JSON in my VB.Net application 4 96
VB: Convert 2 dates to specific format 24 48
vb.net winforms sizing/resolution? 4 34
vb.net class 3 16
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question