Reputation: 11639
To write the numbers in my motherhood language (Persian), I worked with the sting which its value is 1393
(The numbers are in Persian).
return Convert.ToInt32(Year);
But the following error appears:
Input string was not in correct format
I have tried both String
and string
Upvotes: 0
Views: 142
Reputation: 273179
This should work:
CultureInfo info = new CultureInfo("fa-Ir");
int x = Int32.Parse(inuptString, info); // same as Convert.ToInt32()
Upvotes: 4