![]() String route = "/translate?api-version=3.0&from=en&to=fr&to=zu" Input and output languages are defined as parameters. Private static readonly string location = "" It can be found in the Azure portal on the Keys and Endpoint page. required if you're using a multi-service or regional (not global) resource. Private static readonly string endpoint = "" Make sure you update the key variable with the value from your Azure portal Translator instance: Copy and paste the code sample into your application's Program.cs file. For more information, see New C# templates generate top-level statements.ĭelete the pre-existing code, including the line Console.Writeline("Hello World!").You don't need to include top-level statements, global using directives, or implicit using directives. When you use the newer version, you only need to write the body of the Main method. ![]() The new output uses recent C# features that simplify the code you need to write.NET 6, new projects using the console template generate a new program style that differs from previous versions. The accepted value is application/json or charset=UTF-8. Optional when using a single-service global Translator Resource. ![]()
0 Comments
Leave a Reply. |