Search code examples
c#winformstextboxnumbers

Get Unicode Numbers Text from Windows Forms Textbox


I can Type both English Numbers and Persian Numbers in .net 4 Windows Form Text-box such as 123 and ۱۲۳ but always i get English numbers from Text-box.Text property 123


Solution

  • its up to your windows language setting configuration in windows 10 x64 with setting (language for non-unicode programs > Persian) i get unicode Number for persian numbers for example 1777 for ۱

    var txt = textBox1.Text;