Solved

How to convert a string to a unsigned long number in C#?

Posted on 2011-03-24
6
449 Views
Last Modified: 2013-12-17
Want to convert a string to a big number. For example, want to achieve
ToULong("1234567890");
 I got the error:
"error CS0103: The name 'ToULong' does not exist in the current context"
0
Comment
Question by:jl66
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 170 total points
ID: 35204925
           ulong ul = Convert.ToUInt64("1234567890");
0
 
LVL 19

Assisted Solution

by:Rikin Shah
Rikin Shah earned 30 total points
ID: 35204965
Alternative to ToULong is ToUInt64. Try it.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 35204973
Isn't that what I said?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 150 total points
ID: 35205011
Alternative, albeit it only semantic since they both do the same thing:
ulong ul = ulong.Parse("1234567890");

Open in new window

0
 
LVL 8

Assisted Solution

by:cubaman_24
cubaman_24 earned 150 total points
ID: 35214157
And with tryparse..

Best regards.
ulong number;
if(ulong.TryParse("33535355353", out number){
// Do stuf
}

Open in new window

0
 

Author Closing Comment

by:jl66
ID: 35220815
Really appreciated everyone's tips.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Please explain purpose of GZIP 4 56
VB.Net creating Contact in Outlook 1 49
VS2010 Build fails to install 14 75
How to get a Powershell script to launch from Visual Studio 20 63
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 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