Skip to content

Azure Form Recognizer samples for .NET

Choose a tag to compare

released this 04 Jan 19:27
e7d94f9
[FR] Improve samples output (#17729)

Changes based on .NET team and architect feedback:
- Use `Response<T>` in samples
- Use shorter names for the variables
- Use `using var` instead of a `using block` (easier to read)
- Add input variables that user will need to introduce for the code to work, like `formUri` or `formFilePath`.
- Avoid long lines so user doesn't have to scroll
- Replace block of code that look like this with real code:
```
using (FileStream stream = new FileStream(receiptPath, FileMode.Open))
{
    RecognizedFormCollection receipts = await client.StartRecognizeReceipts(stream).WaitForCompletionAsync();
    /*
     *
     */
}
```

Fixes part of: https://github.com/Azure/azure-sdk-for-net/issues/16661