Skip to main content

All Questions

Tagged with
0 votes
0 answers
39 views

How do I specify a user secret in a .NET Core console app?

I've created a .NET 8 Console app. I have also created a user secret with a connection string to one of our SQL Server databases, that looks like this: { "TTConnectionString": { "...
Rod's user avatar
  • 4,291
0 votes
4 answers
174 views

What is the difference between Console.WriteLine and Console.Out.WriteLineAsync in an async method?

Once, when I used the cw snippet (type cwTAB) in an async method, Visual Studio would use await Console.Out.WriteLineAsync(); instead of the original Console.WriteLine();. Today I updated Visual ...
shingo's user avatar
  • 23.8k
1 vote
1 answer
55 views

Is there a way to print 2 characters in one space within console?

So, I am attempting to make a maze game for some coursework at college. I have managed to get a maze generation algorithm working which makes use of recursive backtracking. However, the issue with ...
Maskd's user avatar
  • 11
0 votes
0 answers
16 views

C# List of running processes using windows services vs console app [duplicate]

I tried to use the version described in#37 from .NET console application as Windows service #37 with the files: Program.cs MyService.cs MyServiceInstaller.cs in order to list into a file the ...
Monast's user avatar
  • 1
1 vote
1 answer
78 views

Is it possible to run a WPF application that is started as an console application in Linux

I have a test WPF application that I have changed so it now can startup as an console application, like this. How to be dynamically either console application or Windows Application My application is ...
andersmi's user avatar
0 votes
1 answer
29 views

How to disable non-intended user input in the terminal C#

When i write a infinite loop that doesn't have any behaviour on its body, the user still have the possibility to write text at it, even without calling any input function: Note: I'm using Linux, ...
Marvin Marjan's user avatar
0 votes
0 answers
31 views

Sharprompt: Input data with a regular expression and a selection list

I decided to use the Sharprompt library to enter data in the console application. The Prompt class contains the Input method where I can customize my template, and the Select method for selecting ...
Konstantin Makarov's user avatar
0 votes
0 answers
12 views

Received the email in only one Shared Mailbox even if the receiver / To is 3 Shared Mailbox emails

I'm working with a C# console app. There are 3 shared mailbox. I need to make sure that when a user sends an email in one of the shared mailbox, the email will go to the corresponding shared mailbox ...
cln aln's user avatar
0 votes
0 answers
36 views

In.ReadLine() sometimes skips chars in the beginning string

In.ReadLine() sometimes skips chars in the beginning string and doesn't work as would be expected Could this be caused because i have Win7 Pro x64 NET Framework 4.5.2 I use my program through the ...
jcoder's user avatar
  • 11
1 vote
2 answers
69 views

C# Console converts tabs to spaces

If I print string such: Console.WriteLine(@"test1\ttest2\ttest3") and try to copy the output to excel it will all be in one column, because the Console prints tabs as spaces, is it possible ...
IronHide's user avatar
  • 356
0 votes
0 answers
12 views

How to call without showing number using Twilio using C# API

I need to connect two customer via voice call, but I want to hide original phone number from each other. I thought to implement it using twilio. when i run the console app i have an error the error ...
Mohib's user avatar
  • 1
1 vote
1 answer
43 views

How can I get full stacktrace in my C# app?

I have realized that now I'm getting short stacktrace for exceptions in my app. E.g. I have a simple app: private static void Main(string[] args) { var downloader = new DataDownloader("")...
Seekeer's user avatar
  • 1,364
0 votes
0 answers
52 views

How to parse large json file in c# to avoid Out of memory exception

I have json file stored in text file which is of size 40 GB+.I am using below code which is throwing Out of memory exception. Is there any way we can take part by part of text file and parse ,...
peter's user avatar
  • 8,558
1 vote
2 answers
54 views

Why can't I change the value of a mock object property that hasn't been set up?

I'm new to unit testing, and I'm writing unit tests for .NET C# applications. To create mocks, I use the MOQ NuGet package in my test project. I have an interface with two properties: public interface ...
Harutyun Dokhoyan's user avatar
0 votes
0 answers
46 views

C# console app crashes when running batch file which exist in different directory

I have a batch file, which I need to run from my c# application. Batch file location is different from my c# console app exe location. I'm trying below code, my c# console app crashes after calling ...
Harsh Bhadoria's user avatar

15 30 50 per page
1
2 3 4 5
191