WinForms – How to programmatically check items in CheckedListBox

A CheckedListBox allows the user to check one or more checkboxes. Sometimes you’ll want to be able to check the boxes programmatically. For example, you may want to allow the user to check or uncheck all boxes at once. Or perhaps you want to persist the values the user checked and load them later. To … Read more

C# – How to use enum flags

Enum flags allow you to put multiple values in an enum variable/parameter. This is a nice alternative to the problem of having to pass around a ton of bools . You set multiple values by bitwise ORing them together. Here’s an example: In this article, I’ll show how to create and use enum flags. Use … Read more