I want to convert string to Long. But I got this error:
Input string was not in a correct format
How to convert string to long in C#?
I follow this answer How could I convert data from string to long in c#
This is my code:
if (Convert.ToInt64("140.82") >= minPrice &&
Convert.ToInt64(217.76) <= maxPrice)
{
// do filter
} // on this line the exception is thrown
What is the mistake I made?