Skip to content

Numeric Guessing Game

Type conversion, random numbers, and conditional statements. We'll create a game where the player will try to guess a random number. Fundamental programming concepts will be covered as we build the C# console application. Numeric Guessing Game Framework The framework for our game will have two classes: Program and Game. A method (Play) in the ...continue reading "Numeric Guessing Game: C# Console Application"

External data: using text files to store data. We will create a console application that will let us display text from, and save data to, an external data file. After we walk through how to read in data and write it back out, there is an example of how you could build a simple menu ...continue reading "Reading and Writing External Data (C# Console Application)"

Add color to your console application! Color can help emphasize important content and create an engaging interface. C# console application color is limited, but it can still be used to improve your game or software interface. Text and Background Foreground and background color properties can be changed in C# console applications. The foreground is the ...continue reading "Console Application Color: Text and Background"

ASCII art design

Add design elements to your console application's interface. You can add visual design to your C# text-based console application even though you can't use graphic files. Alphanumeric characters can be used to create design elements, ASCII design, in your console application. Used strategically, ASCII art can make an interface more interesting. Balance your ASCII art ...continue reading "Console Application ASCII Design"

Console Application Title Bar Text

Customize console window size and title. Modifying console window properties can improve your application interface for players of your text-based game, or users of your application. The application's title bar and window size are a couple of the basic command line window properties to consider modifying. Code examples are included to help you test out ...continue reading "Console Application Window Properties"

Iterating our simple C# Madlib code This is part two in a series to create iterative versions of a Madlib in C#. If you haven't read through , start there! Next Iteration A good practice is to keep the amount of code in our Main() function to a minimum. The first step we'll do in ...continue reading "Simple C# Madlib (Part Two)"

function MakeBear

Loops in C#. Loop structures are helpful when repeating statements; for example, if we wanted to print out a message to the console, or if we want to call a function. There are several types of loops that can be used, and each has their own strength. We'll look at do-while, for, and while C# ...continue reading "C# Loops: Ten Bears Song"