Tag Archives: events

Use reflection to list a class’s events in C#

This example uses the following code to add some simple events to the Form1 class. // Make some events. public delegate int MyPublicDelegate(string index); public event MyPublicDelegate MyPublicEvent; private delegate int MyPrivateDelegate(string index); private event MyPrivateDelegate MyPrivateEvent; public virtual event … Continue reading

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

Make a class define and raise events in C#

This example uses a BankAccount class to manage a bank account (and to show how to define and raise events). If the program tries to remove more money from the account than its current balance, the BankAccount object raises an … Continue reading

Posted in classes, events | Tagged , , , , , , , , , , , , | 4 Comments

Book Errata Page: The C# Helper Top 100

This is the errata page for my book The C# Helper Top 100, The 100 most popular posts at csharphelper.com. If you find mistakes, please post them here in the Leave a Reply box at the bottom of the page. … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Book Discussion Page: The C# Helper Top 100

This is a discussion page for my book The C# Helper Top 100, The 100 most popular posts at csharphelper.com. Please post questions, thoughts, and suggestions here in the “Leave a Reply” box at the bottom of the page. I … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Table of Contents: The C# Helper Top 100

This is a brief summary of the book’s table of contents. Introduction Part I. Serialization 1. Read a CSV File into an Array (1) 2. Use JSON to Serialize and Deserialize Objects (49) Part II. Graphing 3. Draw a Graph … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

New Book: The C# Helper Top 100

I’m happy to announce my latest book, The C# Helper Top 100, The 100 most popular posts at csharphelper.com. It describes the 100 most popular posts on the C# Helper web site. This is my 32nd book and my second … Continue reading

Posted in .NET, algorithms, books, C#, C# programming | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Use the mouse wheel to scale an image in C#

This example lets you use the mouse wheel to zoom in and out on an image. To use the mouse wheel, the program needs to catch the MouseWheel event. Unfortunately that event isn’t listed in the Form Designer so you … Continue reading

Posted in events, graphics, image processing | Tagged , , , , , , , , , , | Leave a comment

Handle NumericUpDown value change events in C#

The post Make a NumericUpDown use decimal values in C# shows how you can make a NumericUpDown control display decimal values. When the user clicks a NumericUpDown control’s arrows or presses the up or down arrow key while the control … Continue reading

Posted in controls, mathematics | Tagged , , , , , , , , , | Leave a comment

Use global command bindings in WPF and C#

The example Use custom command bindings in WPF and C# explains how you can make a program use custom commands. (This is a confusing topic so read that post before you continue with this one.) That technique doesn’t quite work … Continue reading

Posted in events, user interface | Tagged , , , , , , , , , , , , , | Leave a comment

Use custom command bindings in WPF and C#

The example Use pre-defined command bindings in WPF and C# explains how you can make a program use pre-defined commands. (This is a confusing topic so read that post before you continue with this one.) This example shows how you … Continue reading

Posted in events, user interface | Tagged , , , , , , , , , , , , , | 2 Comments