C# 2005, I have set the culture like below in Program.cs:
CultureInfo myCulture = new CultureInfo("bn-IN");// like "en-US", "ja-JP" etc...
Thread.CurrentThread.CurrentCulture = myCulture;
Thread.CurrentThread.CurrentUICulture = myCulture;
Application.CurrentCulture = myCulture;
Then after opening the application I choose my keyboard, and hit keyboard 1 which puts my language version of 1. Now I want to convert it to integer so that I can perform addition, subtraction etc. So...
CultureInfo myCulture = Application.CurrentCulture;
myCulture.NumberFormat.DigitSubstitution = DigitShapes.NativeNational;
int i = Convert.ToInt32(textbox1.Text, myCulture.NumberFormat);// this line throws exception with message "Input string was not in a current format"
so how to convert a string in another culture(other than "en-US") to integer ?