-
Recent Posts
-
Recent Comments
Archives
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- June 2013
- December 2012
- September 2012
- July 2012
- June 2012
- November 2011
- May 2011
- April 2011
- February 2011
- December 2010
Categories
- .NET
- 3D
- 3D graphics
- ADO.NET
- algorithms
- animation
- API
- arrays
- attributes
- audio
- books
- C#
- C# programming
- calculations
- challenges
- classes
- clipboard
- coding
- combinatorics
- console
- controls
- cryptography
- curve fitting
- database
- debugging
- dialogs
- directories
- Drag and Drop
- drawing
- drawings
- enums
- Event
- events
- example program
- Excel
- extension methods
- extensions
- files
- finance
- fonts
- formatting
- forms
- fractals
- ftp
- games
- GDI+
- generic
- geometry
- globalization
- graphics
- html
- IDE
- image processing
- inheritance
- interfaces
- internationalization
- internet
- interoperability
- LINQ
- lists
- localization
- mathematics
- memory
- menus
- MessageBox
- methods
- miscellany
- multimedia
- network
- Office
- OOP
- operators
- parsing
- performance
- phone
- PowerPoint
- printers
- printing
- productivity
- programs
- puzzles
- recursion
- reflection
- registry
- regular expressions
- serialization
- settings
- SQL
- stories
- strings
- syntax
- system
- threading
- three-dimensional graphics
- tips
- tools
- transformations
- Uncategorized
- user interface
- variables
- VBA
- web
- Windows Forms programming
- WMI
- Word
- wpf
- XAML
- XML
Meta
Tag Archives: classes
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
Tagged C#, C# programming, classes, example, example program, generic, generic classes, OOP, random, random tree, TreeNode, trees, Windows Forms programming
Leave a comment
Build a polygon selector class in C#
This example shows how to make a polygon selector class that makes it easy to let the user select a polygon. I call this kind of class that provides a service for another class a symbiont. In a symbiotic relationship, … Continue reading
Posted in classes, drawing, graphics
Tagged C#, C# programming, classes, drawing, example, example program, graphics, polygon selector, Windows Forms programming
1 Comment
Use a sprite class to animate bouncing cats in C#
A sprite is an object that you use to control a single object in an animation or game. Normally a sprite class must do two things: draw its object and move its object. This example defines an ImageSprite class that … Continue reading
Posted in animation, classes, graphics
Tagged animation, C#, C# programming, classes, example, example program, graphics, Windows Forms programming
Leave a comment
Compress and decompress directories in C#
The ZipFile class provides remarkably simple methods to compress and decompress directories in the zip format. This class is defined in the .NET Framework version 4.5, so this example is in Visual Studio 2017 instead of an older version. To … Continue reading
Posted in classes, directories, files
Tagged C#, C# programming, classes, compress, compress and decompress directories, compress directories, compress files, compressions, decompress, directories, example, example program, files, uncompress, unzip, Windows Forms programming, Zip, zip directories, zip files, ZipFile
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
Convert an array of bytes into an integer and back in C#
The BitConverter class provides static methods that let you convert various data types to and from arrays of bytes. (I suppose it might have made more sense to call it the ByteConverter class.) You can use those methods to convert … Continue reading
Posted in classes
Tagged BitConverter, bytes, C#, C# programming, classes, example, example program, GetBytes, ToInt32, Windows Forms programming
2 Comments
Find class ancestors in C#
The example Find classes that implement an interface or that are descendants of a given class in C# shows how to find a list of classes that are descendants of a class or interface. This example uses similar code to … Continue reading
Posted in classes, inheritance, interfaces, reflection
Tagged ancestor classes, C#, C# programming, class ancestors, classes, example, example program, find ancestor classes, find derived classes, GetAssemblies, GetTypes, IDisposable, inheritance, interfaces, reflection, Windows Forms programming
Leave a comment
Find classes that implement an interface or that are descendants of a given class in C#
This example lets you find classes that are part of an inheritance or implementation hierarchy. When you enter a class or interface name and click Find, the example uses the following code to search the currently loaded assemblies for classes … Continue reading
List a program’s loaded assemblies in C#
The key to this example is the following ListAssemblies method. // List the assemblies. private void ListAssemblies() { lblNumAssemblies.Text = “”; lstAssemblies.Items.Clear(); Cursor = Cursors.WaitCursor; Refresh(); foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) { lstAssemblies.Items.Add(assembly.GetName().Name); } // Display the number of assemblies. … Continue reading
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 .NET, algorithms, animation, API, books, C#, C# Helper, C# programming, classes, clipboard, combinatorics, cryptography, curve fitting, dialogs, drag and drop, drawing, events, example, example program, Excel, files, fractals, FTP, graphics, image processing, interop, interoperability, mathematics, multimedia, Office, printing, Rod Stephens, serialization, system, threading, tips, tools, Windows Forms programming
2 Comments