# Monthly Archives: May 2020

## Create a schedule for a round robin tournament with home teams in C#

My book Essential Algorithms, Second Edition describes an algorithm for creating a round robin schedule in detail. The following posts also explain how you can create a round robin schedule in slightly less detail. Generate a schedule for a round … Continue reading

Posted in algorithms, combinatorics, mathematics | | Comments Off on Create a schedule for a round robin tournament with home teams in C#

## Understand fill modes in C#

C# drawing routines have two fill modes. In Windows Forms they are called Alternate and Winding. In WPF they are called Odd/Even and Non-Zero. This example lets you draw polygons and see how the two fill modes determine which points … Continue reading

Posted in drawing, graphics | | 1 Comment

## Display COVID-19 data for US states in C#

The example Graph world total COVID-19 cases, deaths, and recoveries in C# lets you view and compare COVID-19 data for countries around the world. This example lets you compare data for the US states and territories. I asked in previous … Continue reading

Posted in drawing, graphics | | Comments Off on Display COVID-19 data for US states in C#

## Make a random tree of generic TreeNode objects in C#

The example Handle generic TreeNode mouse events in C# explains how to build a tree where each node is represent by a TreeNode object. Each TreeNode contains its own object that determines how the node is drawn. This example the … Continue reading

Posted in classes, generic, OOP | | Comments Off on Make a random tree of generic TreeNode objects in C#

## Quick COVID-19 update

Recently President Trump claimed that the United States and Germany were tied for the fewest COVID-19 deaths per capita in the world. The example Graph world total COVID-19 cases, deaths, and recoveries in C# allows you to check that claim … Continue reading

Posted in drawing, graphics | | Comments Off on Quick COVID-19 update

## Prevent “underlying connection was closed” errors in C#

This example shows how to fix the error “The underlying connection was closed” when downloading a response from a web page. Background The basic approach for downloading a result from a web page is simple. Create a new WebClient object … Continue reading

## Graph world total COVID-19 cases, deaths, and recoveries in C#

My previous COVID-19 posts examined cases, deaths, and recoveries for different countries. I recently wanted to look at the world-wide totals, so I made this modification. Making changes to handle the world totals separately would have been a lot of … Continue reading