Questions tagged [console-application]

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most Graphical User Interface (GUI) operating systems, such as the Win32 console in Microsoft Windows, the Terminal in Mac OS X, and xterm in Unix.

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most Graphical User Interface (GUI) operating systems, such as the Win32 console in Microsoft Windows, the Terminal in Mac OS X, and xterm in Unix. A user typically interacts with a console application using only a keyboard and display screen, as opposed to GUI applications, which normally require the use of a mouse or other pointing device. Many console applications such as command line interpreters are command line tools, but numerous text-based user interface (TUI) programs also exist.

As the speed and ease-of-use of GUI applications have improved over time, the use of console applications has greatly diminished, but not disappeared. Some users simply prefer console based applications, while some organizations still rely on existing console applications to handle key data processing tasks.

7241 questions
2
votes
2 answers

C# Reading and placing a character at a specific location

First off, thank you in advance for your help. I'm a student and i'm just getting started with programming in C#, so please excuse me for making my code so incredibly messy. With the intended purpose of both practicing and having a bit of fun, i'm…
TheBattleCat
  • 121
  • 1
  • 2
  • 13
2
votes
0 answers

capture STDOut from already running process in c#

Lets say I have some kind of console app currently running, not started by my app. (Could be a cmd.exe or some sort of console app) How do I get my app to read all the text (stdout/stderr) in inside that app?
Rurido
  • 53
  • 5
2
votes
1 answer

Configure User Secrets in .NET Core 2.1 Console Apps

I know that in .NET Core MVC, you can do it using the context menu, but this option is not available for .NET Core Console apps. How can I add User Secrets to my .NET Core 2.1 Console Application?
Gianlucca
  • 1,334
  • 2
  • 14
  • 26
2
votes
1 answer

How to catching Unhandled Exceptions in Console application

I often find unhandled exceptions in my console application. Then later it hangs and stops all processes. I'm also forced to restart the program before it will work normally. Unhandled Exception: My program is a server program. I don't want it to…
Poppy Nw
  • 33
  • 2
  • 7
2
votes
2 answers

.NET Core Console App UnauthorizedAccessException After Creating Directory

Creating a directory with .NET Core 2.0 successfully creates a directory in the file system but I am unable to write to it. var downloadPath = Path.Combine(DownloadPath, "Target"); var downloadDirectory = Directory.CreateDirectory(downloadPath); //…
Adam
  • 4,590
  • 10
  • 51
  • 84
2
votes
1 answer

Console Application - DbContext instance cannot be used inside OnConfiguring

I'm using Asp.Net Core Console Application and Entiy Framework Core and Unit of Work repository pattern. When I'm using multi thread function, I get this error: DbContext instance cannot be used inside OnConfiguring since it is still being…
2
votes
6 answers

Alter Enumeration Menu Name Format [C#]

I'm having an issue with formatting how I specifically want to display the enumeration items to the console window. As of right now the Menu method displays the items in the enumeration as follow: [1] CreateCustomer [2] CreateAccount [3]…
NTaveras
  • 73
  • 1
  • 8
2
votes
2 answers

StringBuilder display spaces in hidden message

So essentially I want the displayToPlayer variable have the spaces automatically added but I'm not quite sure how to achieve this. How can I have the spaces automatically added to the hidden message without using a turn or it been added to the…
George
  • 31
  • 2
2
votes
1 answer

Asp.Net Core prevent console app shutdown

We have a web app built in asp.net core 2.0 hosted on IIS. From this app we are invoking a console app which performs queued request from database. Problem is that application is used by very less people so it and the console process performs long…
Sid
  • 2,582
  • 4
  • 16
  • 20
2
votes
0 answers

Remove Line in Word If variable Is Null

I am attempting to execute the below code, however when my code hits my function DeleteCurrentSelectionLinenothing is deleted. I expect my method DeleteCurrentSelectionLine() to delete the line if replaceWithText is null. And as you see, the…
Timmy Turner
  • 99
  • 1
  • 8
2
votes
1 answer

Access Embedded Resource In Console App

I am embedding a .docx file into my Console App, and I want to be able to distribute the console.exe and have the users be able to access the .docx file inside it. I have set the .docx file as a resource (see image) - however, if I try to "access"…
Timmy Turner
  • 99
  • 1
  • 8
2
votes
0 answers

Change Microsoft SourceCode Console.WriteLine

I am working with some legacy code that Console.Write and Console.WriteLine are used a lot. I would like to fire an event every time this method is called. That said, I went to the OpenSource library and found out that there isnt an event that is…
3xGuy
  • 2,235
  • 2
  • 29
  • 51
2
votes
1 answer

How to run .net Core app that depends on NuGet packages on Ubuntu

I have a very simple .net Core (2.1) console application that uses a couple of NuGet packages for development. When I compile (not self-contained) it's output is as follows: HelloWorld.deps.json HelloWorld.dll HelloWorld.pdb…
Rob
  • 6,819
  • 17
  • 71
  • 131
2
votes
1 answer

Console application using a new screen

Simply like vim, nano, and some other command line text editors. When entering the application, it turns into another text-based screen, and the application can modify every single characters as UI independently without any command line screen…
Alsein
  • 4,268
  • 1
  • 15
  • 35
2
votes
2 answers

Set Cursor Position Relative to Last Line of Text | C# Console App

Good Day If this is the output of the Console: . . . . Hello World! I would like to set the cursor's position, say 20 lines from the last line of text. How would I do this in the case that the last line is obviously constantly changing? Thank you…
MarkusMulholland
  • 199
  • 2
  • 14