From 04c8ea7d2bccb9ae2fd1bf5481a8b35957c22089 Mon Sep 17 00:00:00 2001 From: Bene Lorant Date: Tue, 30 Jul 2024 18:52:22 +0300 Subject: [PATCH] docs: Added using statement to document translation in README.md. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a20a64..c4cee75 100644 --- a/README.md +++ b/README.md @@ -180,10 +180,11 @@ that case the input file name (or extension) is required, so the DeepL API can determine the file type: ```c# ... + using outputFile = File.OpenWrite(outputDocumentPath); await translator.TranslateDocumentAsync( new MemoryStream(buffer), "Input file.docx", // An extension like ".docx" is also sufficient - File.OpenWrite(outputDocumentPath), + outputFile, "EN", "DE", new DocumentTranslateOptions { Formality = Formality.More });