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

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"
jl66Asked:
Who is Participating?
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
           ulong ul = Convert.ToUInt64("1234567890");
0
 
Rikin ShahConnect With a Mentor Microsoft Dynamics CRM ConsultantCommented:
Alternative to ToULong is ToUInt64. Try it.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Isn't that what I said?
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
Alternative, albeit it only semantic since they both do the same thing:
ulong ul = ulong.Parse("1234567890");

Open in new window

0
 
cubaman_24Connect With a Mentor Commented:
And with tryparse..

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

Open in new window

0
 
jl66Author Commented:
Really appreciated everyone's tips.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.