Tag Archives: example

Animate maze solving, version 3

The previous maze-solving examples Animate maze solving, version 1 and Animate maze solving, version 2 used a recursive method named Solve that returns an IEnumerable containing the paths that the program was searching. Removing Recursion To remove the recursion, think … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , | Leave a comment

Animate maze solving, version 2

My earlier post Animate maze solving, version 1 uses a method that returns an enumeration to show the steps used to find a path through a maze. That method works but it uses a loop that includes calls to Thread.Sleep … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , | Leave a comment

Quarantine Reading Suggestions

Currently more than a billion people are locked down to slow the spread of the COVID-19 virus. If you’re a programmer, then you can hopefully work from home and remain productive. If you can’t, here are some suggestions for books … Continue reading

Posted in books | Tagged , , , , , | Leave a comment

Animate maze solving, version 1

The post Solve mazes in C# solves mazes very quickly, but it only shows you the final path from the start point to the end point. It might be nice to make a program to animate maze solving so you … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , | 2 Comments

Solve mazes in C#

This example shows how to solve mazes that were created by the example Make and draw a maze in C#. See that example for information about how to build a maze. Read the following sections to learn how to solve … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , , , | 1 Comment

Make a simple program to analyze COVID-19 symptoms in C#

This example shows how to build an extremely simple program to analyze COVID-19 symptoms. It should not be taken as actual medical advice. It’s presented here as an example of a very simple artificial intelligence application. Background This type of … Continue reading

Posted in algorithms | Tagged , , , , , , | 2 Comments

Move and resize polygons in WPF and C#

The example Move and resize multiple shapes in WPF and C# shows how to resize some shapes in WPF, but it doesn’t let you resize polygons. You determine the position and size of most shapes by giving their left, top, … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | 2 Comments

Move and resize multiple shapes in WPF and C#

The example Move and resize multiple rectangles in WPF and C# shows how to let the user move and resize multiple rectangles in a WPF program. This example extends that one to let you move and resize multiple shapes. See … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | 7 Comments

Draw a horizontal compass in C#

This example shows how to draw the horizontal compass shown at the bottom of the picture on the right. On the surface this seems like a simple drawing exercise. It mostly is a drawing exercise, although it turned out to … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , | 1 Comment

Load enums at runtime to understand them and their attributes in C#

This example shows how you can load enums from a file at runtime. It demonstrates several useful techniques including: Defining custom attributes Defining attributes with multiple parameters Creating attributes at both design time and run time Loading code at runtime … Continue reading

Posted in enums, reflection | Tagged , , , , , , , | Leave a comment