© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
26 replies
Down

❔ error when converting string to long

System.FormatException: Input string was not in a correct format.
System.FormatException: Input string was not in a correct format.


you can see on image from what im trying to convert
public string ChangePercent24Hr { get; set; }
public long ChangePercent24HrD => long.Parse(ChangePercent24Hr);
public string ChangePercent24Hr { get; set; }
public long ChangePercent24HrD => long.Parse(ChangePercent24Hr);
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Converting string to DateTimeOffset
C#CC# / help
2y ago
how to avoid "-0" when converting float to string?
C#CC# / help
16mo ago