-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
C# 14 and .NET 10 – Modern Cross-Platform Development Fundamentals - Tenth Edition
By :
Console apps are text-based and are run at the command prompt. They typically perform simple tasks that need to be scripted, such as compiling a file or encrypting a section of a configuration file. Equally, they can also have arguments passed to them to control their behavior.An example of this would be to create a new console app using the F# language with a specified name instead of using the name of the current folder, as shown in the following command:
dotnet new console -lang "F#" --name "ExploringConsole"
The two most common tasks that a console app performs are writing and reading data. We have already used the WriteLine method to output, but if we didn’t want a carriage return at the end of a line, for example, if we later wanted to continue to write more text at the end of that line, we could have used the Write method.If you want to write three letters to the console without carriage...