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.

0 votes
1 answer
26 views

How to parse datetime string which has no spaces in it in C#? [closed]

I am trying to convert following string as a valid datetime. string DateTimeString = "04052021031600PM"; DateTime BillingDate = DateTime.ParseExact(DateTimeString,"ddMMyyyyHHmmsstt"...
0 votes
0 answers
19 views

Run Function App Locally (With Out Time Limit)

I'm aware the function App time limit is 10 minutes, and I'm aware that if my function is taking more than 10 minutes that I need to refactor. However, I critically need run an importer function that ...
-1 votes
0 answers
19 views

How do I prevent the same string being randomly selected more than once? [duplicate]

I've just started learning C# in school and currently I am making a simple randomizer. This randomizer will write 10 lines, one for each team in Formula 1. It will then randomly select from a pool of ...
0 votes
0 answers
28 views

Prevent the console app to got terminated after the Run method call [Cysharp ConsoleAppFramework]

So, I'm testing the initial examples from Cysharp ConsoleAppFramework like that: var app = ConsoleApp.Create(args); app.AddCommands<Foo>(); app.Run(); But when I build/run the app, my console ...
0 votes
0 answers
32 views

ReadFile discarding data for console input containing multibyte characters, how to get correct input?

I was trying to implement a unified input interface using Windows API function ReadFile for my application, which should be able to handle both console input and redirection. It didn't work as ...
0 votes
0 answers
41 views

How to write UTF-8 to Console in a WPF application

I have a WPF application that also writes to stdout because it can operate in two modes, UI or console. The output contains non-ascii characters, e.g. Console.WriteLine("ÀÁÂÃ��ÅÆ ®¯°±¹²³¼½¾¶·"...
  • 1,440
0 votes
0 answers
29 views

How do I hide the command window after a certain point of the script?

I have an input command that needs to be shown first and then close. How would I achieve this? I want it to run in the background after inputting the command in the console.
0 votes
0 answers
26 views

Using same Configuration in two different applications

I'm currently developing solution which includes two applications: Azure Function & basic Console Application. I would like to use same Configuration file (local.settings.json, which is ...
  • 111
0 votes
0 answers
22 views

Serilog not recording logs into MS SQL server, from .Net 6 Console App

I have added Serilog into one of my console applications but it is not recording logs in SQL server, nor it is throwing any error. Please refer the code below: public static async Task Main(string[...
  • 137
1 vote
1 answer
35 views

C# service from console application

I have a Console Application that every x minutes makes an API call and, based off the response, control some IoT switches. I need this to run 24/24 on a windows machine. I figured out that running it ...
0 votes
0 answers
21 views

How can .Net 6.0 console app template create the old program style

Using .Net 6.0, when we create a C# project with the Console app template we get only this: // See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!");...
  • 4,075
-3 votes
0 answers
27 views

snake game in c-why stars move(how to fix?) [closed]

well i am a new in this stuff and i am trying to make a snake game for some reason the border moves when i try to edd the fruit or the snake head, i dont know maybe its my visual studio because my ...
0 votes
1 answer
27 views

How to Call asmx service without adding service reference in C#.Net

I am working on calling asmx webservice method without adding service reference as asmx doesn't provide wsdl. I can access asmx service from fiddler as well as from postman. It works fine. However ...
  • 19
-1 votes
2 answers
63 views

How to access the ServiceProvider from the Program.cs in .Net6 Console Application

I have a .Net6 Console application. I have a Startup.cs public class Startup { public IConfiguration Configuration { get; private set; } public Startup(IConfiguration ...
1 vote
0 answers
52 views

File is not downloading using DownloadToAsyc method

I am trying to download a file from azure blob storage using the console app but it is not working well. I am getting 206 responses from DownloadToAsync() method. I am not getting any exceptions, but ...

15 30 50 per page
1
2 3 4 5
466