How do we use OcrEngine2 for c #?

Hi
I want to use ocrengine2 to recognize numbers. How do I switch?

form.Add(new StringContent(“2”), “ocrengine”);

I updated the C# OCR example code in Github.

See here: Free-OCR-API-CSharp/Form1.cs at 74c4bd837d89cdf098020141c634521e20b2b3d7 · A9T9/Free-OCR-API-CSharp · GitHub

Your code snippet looks good. So I am not sure why it does not work. =>As a test, can you please download the example project and test it there?

      try
                {
                    HttpClient httpClient = new HttpClient();
                    httpClient.Timeout = new TimeSpan(1, 1, 1);


                    MultipartFormDataContent form = new MultipartFormDataContent();
                    form.Add(new StringContent("helloworld"), "apikey"); //Added api key in form data
                    form.Add(new StringContent(getSelectedLanguage()), "language");

                    form.Add(new StringContent("2"), "ocrengine"); 
                    form.Add(new StringContent("true"), "scale");
                    form.Add(new StringContent("true"), "istable");

                    if (string.IsNullOrEmpty(ImagePath) == false)
                    {
                        byte[] imageData = File.ReadAllBytes(ImagePath);
                        form.Add(new ByteArrayContent(imageData, 0, imageData.Length), "image", "image.jpg");
                    }