Password masking console application

Console.Write(“\b \b”); will delete the asterisk character from the screen, but you do not have any code within your else block that removes the previously entered character from your pass string variable. Here’s the relevant working code that should do what you require: var pass = string.Empty; ConsoleKey key; do { var keyInfo = Console.ReadKey(intercept: … Read more

How to run .NET Core console application from the command line

If it’s a framework-dependent application (the default), you run it by dotnet yourapp.dll. If it’s a self-contained application, you run it using yourapp.exe on Windows and ./yourapp on Unix. For more information about the differences between the two app types, see the .NET Core Application Deployment article on .NET documentation.

How to stop C# console applications from closing automatically? [duplicate]

Update: As of Visual Studio 2017, there’s a built-in option in the IDE at: Tools > Options > Debugging > Automatically close the console when debugging stops Unchecking it will automatically pause the application at the end of the execution, allowing you the easily check its output without having to add extra code to your … Read more

Could not load file or assembly … An attempt was made to load a program with an incorrect format (System.BadImageFormatException)

I am pretty sure you’re having a 32-bit / 64-bit conflict. It sounds like your main project might be set to 32-bit while the class its referencing is set to 64-bit. Try looking at this SO question and this one too. Between the two of them, you should be able to figure out your problem.

Can’t specify the ‘async’ modifier on the ‘Main’ method of a console app

As you discovered, in VS11 the compiler will disallow an async Main method. This was allowed (but never recommended) in VS2010 with the Async CTP. Update, 2017-11-30: As of Visual Studio 2017 Update 3 (15.3), the language now supports an async Main – as long as it returns Task or Task<T>. So you can now … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)