Practice debugging and troubleshooting. Solving code problems can be a challenge, especially when the errors aren't obvious. With a bit of debugging practice, though, you can learn to quickly identify and fix common errors. One of the ways you can practice your troubleshooting and critical thinking skills is to take an application that is broken, ...continue reading "Debugging Code: Poem Generator (C#)"
Tag: array
C# Random Fortune
Get a random fortune! Create a random fortune generator; a C# console application that selects a random element from a string array. The output is formatted to resemble the slip of paper found in a fortune cookie. Array of strings Instance of Random Formatting output Example Output UML Code The code for our random fortune ...continue reading "C# Random Fortune"
C# Arrays (Console Application)
Fun with arrays! Arrays are structures that organize related data into sets. This demo application uses the C# Array class members Length and Sort. Although this example is more fun than practical, it demonstrates how Array properties and methods can be used. Array Overview An array stores multiple variables. This structure is helpful with several ...continue reading "C# Arrays (Console Application)"
Dynamic Button UWP: Navigate Array Content
One button to control it all! Create a simple proof-of-concept UWP application with a dynamic button. Navigate linear content stored in an array with one 'Next' button. After all content has been shown, button text changes from 'Next' to 'Start Over'. Notes This post is an update of the Dynamic Button (Windows Form). This tutorial ...continue reading "Dynamic Button UWP: Navigate Array Content"
Word Guessing Game: C# Console Application
Random words, an array, and conditional statements. Create a word guessing game that asks a player to guess a random word. As we build the C# console application, we'll discuss some fundamental programming concepts. We'll build upon the code we started in . (If you haven't read it yet, you might want to start there!) ...continue reading "Word Guessing Game: C# Console Application"
Simple C# Madlib (Part Three)
Arrays and loops can make our Madlib code more organized. This is part three in a series to create iterative versions of a Madlib in C#. If you haven't read through , start there! Focusing primarily on improving our code, we'll add two arrays and a loop. By using an array we can condense the ...continue reading "Simple C# Madlib (Part Three)"
Random Properties
Generate characters from arrays of properties. An example of generating random properties about a character. The values are stored in arrays, and when an instance of the Character class is created, property values are randomly assigned. A public method, characterInformation(), writes out the properties. Code: Random Properties //ProgrammingIsFun.com using System; namespace RandomProperties { class Program ...continue reading "Random Properties"