Learn what it means to convert data from one type to another in C# (type conversion). C#, like most programming languages, has several built-in data types such as integer, string, and boolean. These classifications determine the range of values a variable of that type can hold, how the data will be stored, and what can ...continue reading "C# Type Conversion (and Coffee!)"
Tag: C#
Debugging Code: Poem Generator (C#)
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#)"
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"
Basic UWP: Virtual Pet Setup
Learn basic UWP skills. This walk through shows how to start a simple UWP project, and covers some of the fundamental elements you might need in an application. We'll use a 'Virtual Pet' setup as our example topic. TextBlock and TextBox Buttons and event handlers Change an element's color New Project Launch Visual Studio and ...continue reading "Basic UWP: Virtual Pet Setup"
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)"
ConsoleColor as Parameter (Console Application)
Using an object as a method parameter! This short example shows how you can make a ConsoleColor object (myColor) and pass it as an argument to a method. The method uses the object to change text color. After a message is typed into the console window, it is printed in color. Then color is reset ...continue reading "ConsoleColor as Parameter (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"