How do we use OcrEngine2 for c #?

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:

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?

                    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");