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
 I got the error:
"error CS0103: The name 'ToULong' does not exist in the current context"
Who is Participating?
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
           ulong ul = Convert.ToUInt64("1234567890");
Rikin ShahConnect With a Mentor Microsoft Dynamics CRM ConsultantCommented:
Alternative to ToULong is ToUInt64. Try it.
AndyAinscowFreelance programmer / ConsultantCommented:
Isn't that what I said?
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

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

jl66Author Commented:
Really appreciated everyone's tips.
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.