Performing some action while waiting for a key to be pressed in .NET console applications

You can wait for the user to press some button in a .NET console application using the Console.ReadKey() method. That’s simple and easy to use, but occasionally you might want to perform some action while waiting for the user to press a key.

The KeyAvailable property of the Console object helps you achieve just that.

Read more of this post

Advertisements

How to hide the text entered in a .NET console application

You’ve probably encountered console applications that ask for a password. It’s very likely that the password will stay hidden otherwise other people viewing your screen can easily read it.

This short post will present a possible solution on how to achieve a hidden string input in a .NET console application.

Read more of this post

How to hide the key pressed in a .NET console application

You probably know how to read the key pressed by the user in a .NET console application by the Console.ReadKey() method:

ConsoleKeyInfo pressedKey = Console.ReadKey();
Console.WriteLine("You have pressed: {0}", pressedKey.Key);

Read more of this post

How to hide the text entered in a .NET console application

You’ve probably encountered console applications that ask for a password. It’s very likely that the password will stay hidden otherwise other people viewing your screen can easily read it.

This short post will present a possible solution on how to achieve a hidden string input in a .NET console application.

Read more of this post

Performing some action while waiting for a key to be pressed in .NET console applications

You can wait for the user to press some button in a .NET console application using the Console.ReadKey() method. That’s simple and easy to use, but occasionally you might want to perform some action while waiting for the user to press a key.

The KeyAvailable property of the Console object helps you achieve just that.

Read more of this post

How to redirect standard output for a .NET console application

Normally a .NET console application writes its messages directly to the console so that the user can view them. This is done with one of the “Write” methods like Console.WriteLine(some message) where you can prompt the user for some input.

However, this is not the only option you have. The standard output channel can be overridden.

Read more of this post

How to warn the user if either CapsLock or NumLock are pressed in a .NET console application

You’ve probably come across applications that warn you if the CapsLock button is pressed when typing a password. It’s a clever way to warn the user as passwords are normally not shown on the screen in plain text so it’s difficult to see what you’re typing. Similarly the NumLock button affects the behaviour of various keys on your keyboard.

Detecting whether those two special buttons are pressed is very simple in .NET console applications.

Read more of this post

ultimatemindsettoday

A great WordPress.com site

Elliot Balynn's Blog

A directory of wonderful thoughts

Robin Sedlaczek's Blog

Developer on Microsoft Technologies

HarsH ReaLiTy

My goal with this blog is to offend everyone in the world at least once with my words… so no one has a reason to have a heightened sense of themselves. We are all ignorant, we are all found wanting, we are all bad people sometimes.

Softwarearchitektur in der Praxis

Wissenswertes zu Webentwicklung, Domain-Driven Design und Microservices

the software architecture

thoughts, ideas, diagrams,enterprise code, design pattern , solution designs

Technology Talks

on Microsoft technologies, Web, Android and others

Software Engineering

Web development

Disparate Opinions

Various tidbits

chsakell's Blog

Anything around ASP.NET MVC,WEB API, WCF, Entity Framework & AngularJS

Cyber Matters

Bite-size insight on Cyber Security for the not too technical.

Guru N Guns's

OneSolution To dOTnET.

Johnny Zraiby

Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

%d bloggers like this: