How to use Console SetIn and SetOut in C# .Net

Опубликовано: 15 Октябрь 2024
на канале: Authorised Territory
84
8

Authorised Territory code examples - This .NET C# #tutorial shows how to use Console SetIn and SetOut.
First, we load contents of a text file and display them in the console window.
Next, we write new content to the text file.
The contents of the file is read using Console.SetIn and stored in a variable.
Finally, we display the variable to the console window using StreamWriter and Console.SetOut.