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
4 answers

Finding the sum and adding a probability scale

I am working on an assignment where I need to create a fully functioning Yahtzee program. I am now done with the initial task, and have a fully functioning Yahtzee application, so I can roll the dice and I can hold values etc. But the problem I am…
user1845777
  • 145
  • 1
  • 9
2
votes
1 answer

Best way to communicate between a dotnet-core console application and a regular winforms application

So I want to have two applications: The first one will be a WinForms GUI (probably .NET Framework) and the second one is a .NET Core console application that does all the processing. My goal is to have the WinForms applications start the console…
Lukas
  • 169
  • 1
  • 2
  • 8
2
votes
1 answer

How do I get accounts from Azure AD?

I have a nice Azure Active Directory set up with a dozen users. (All me!) So I have a Tenant ID, client ID and Client Secret. I am also working on a simple console application that will function as a public client for this directory. This client…
Wim ten Brink
  • 25,901
  • 20
  • 83
  • 149
2
votes
1 answer

Get current console font info

I am writing an Image Viewer in C# .NET for the console. My problem is that the console font characters are not squares. And I'm treating them as pixels, this stretches the images when drawn on screen. I want to somehow read the font information…
William R.
  • 145
  • 1
  • 11
2
votes
1 answer

Is there a way to connect Azure AD MFA enabled outlook mailbox through a console application C#?

I have a console application written in c# which we use to connect to outlook mailbox using exchange service to read the emails from the inbox. Recently, we have migrated to Azure AD with MFA and after that change, my code is throwing 401…
2
votes
4 answers

How to determine if the application is already running? C portable Linux/Win

Is there a way to write a C code that allow us to determine if a previous instance of an application is already running? I need to check this in a portable way for Linux and Windows, both using the last version of GCC avaiable. Any examples of…
DrBeco
  • 11,237
  • 9
  • 59
  • 76
2
votes
0 answers

Unity: Can you read/write to standard in/output of a console application while still having it appear in the console?

I have written two independant applications: A unity game that wants to interact with a console application, and a windows uwp console application that connects to a bluetooth device and pulls data from it for the unity application. I can start the…
J_Exo
  • 21
  • 2
2
votes
1 answer

dotnet console app, using generic host, HostedService, Windows Task Scheduler stays in running state

Trying to figure out why my console app won't stop running. Using the following approach in a dotnet core application main method: await new HostBuilder(). ... .ConfigureServices((hostContext, services) => { …
2
votes
1 answer

CRM Console Application on MacOS

I have Visual Studio Enterprise 2019 installed on a Mac running Mojave (10.14.4) and I am trying to create a simple C# Console Application to retrieve and update records in my CRM environment. I am initializing a new instance of CrmServiceClient…
2
votes
2 answers

When is calling CoInitialize required for a Windows console application

The code below, derived from https://learn.microsoft.com/en-us/windows/desktop/shell/folder-info#determining-an-objects-parent-folder, works as expected when compiled and run via Visual Studios 2017: #include "stdafx.h" #include #include…
recvfrom
  • 389
  • 6
  • 14
2
votes
1 answer

How to avoid force kill to stop a console application?

I need to be able to shutdown an console application gracefully on demand. Using this post i was able to control exit when CTRL events are received. Yet, i can't stop the application on demand, using taskkill. If i try the command: taskkill /im…
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
2
votes
1 answer

Execute a few commands via C# console-app

I'm new to C# (and development in general). I need to write a method in C# that will execute following via console: - install Newman; - execute postman Run. I've created a method as below (I tried 2 options: ReadToEnd and WaitForExit), but it seems…
KVN
  • 863
  • 1
  • 17
  • 35
2
votes
2 answers

Console app only terminates when holding key down while running batch script

I am trying to create a C# console application that repeatedly runs a .bat file and saves the output into a variable to be modified later. The script is meant to get open TCP connections on a connected device using adb.exe. I want the application to…
Remy
  • 4,843
  • 5
  • 30
  • 60
2
votes
0 answers

How to get the ProjectContext after acquiring a Sharepoint ClientContext through multi factor authentication?

I would like to interact with Project Onine through CSOM/C#, for a client which has MFA enabled. With the snippet below I can get through the sharepoint MFA I think (the debugger progresses past those lines), but how then do I get the context for…
2
votes
2 answers

C# Is there a compact way to get more than one coordinate in a 2d-array?

Trying to make connect4 and I want to check if a column (vertical) is full, so the easy way to do it would be in an if with [i, 1] != O && [i, 2] != O && [i, 3] != O et cetera, but isn't there a more efficient way to go on about this? A board looks…
zhrgci
  • 584
  • 1
  • 6
  • 25