Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 504
  • Last Modified:

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"
0
jl66
Asked:
jl66
4 Solutions
 
AndyAinscowCommented:
           ulong ul = Convert.ToUInt64("1234567890");
0
 
Rikin ShahMicrosoft Dynamics CRM ConsultantCommented:
Alternative to ToULong is ToUInt64. Try it.
0
 
AndyAinscowCommented:
Isn't that what I said?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Carl TawnSystems 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_24Commented:
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

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now