Tag Archives: example

Compare the performance of the float, double, and decimal data types in C#

A computer’s math coprocessor typically gives the best performance with a particular data type. To see which works best on my system and to learn how big the difference is, I wrote this program to compare the performance of calculations … Continue reading

Posted in performance, variables | Tagged , , , , , , , , , , | 6 Comments

Save several images into Access in C#

The example Save images in an Access database in C# includes an Access database. Unfortunately if you save several images into the database and then open the database in Access, Access removes the images. It just doesn’t seem to understand … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Find .NET libraries for namespaces in C#

Some namespaces have names that nicely match their .NET libraries. For example, the System.Drawing namespace is defined in the System.Drawing library. Unfortunately a namespace’s name doesn’t always match the name of the .NET library that defines it. For example, the … Continue reading

Posted in .NET, miscellany | Tagged , , , , , , , , | Leave a comment

Load images from an Access database in C#

The post Save images in an Access database in C# explains how to save images in an Access database. This post explains how to load images from an Access display them. Like previous examples, this program uses a SQL statement … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 2 Comments

Save images in an Access database in C#

This example shows how you can save images in an Access database. The example Use filenames stored in a database to display images in C# shows how to display images by saving the image file names in a database and … Continue reading

Posted in database, graphics, image processing, Office | Tagged , , , , , , , , , , , , , , , , , | 4 Comments

Use the Filter property to select image files in C#

This example is mostly intended to make it easier to find these filters. I use them a lot and it’s a pain to have to recreate them every time I need them. When you click the Different Types button, the … Continue reading

Posted in controls, dialogs, image processing | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Use filenames stored in a database to display images in C#

The reason so many people ask how to store and retrieve images in a database is that it’s hard. You need to use a special data type such as the BLOB (Binary Large Object) or MEMO data type depending on … Continue reading

Posted in database, graphics, image processing, user interface | Tagged , , , , , , , , , , , , , , | 2 Comments

Move and resize multiple rectangles in WPF and C#

The example Let the user move and resize a rectangle in WPF and C# shows how to let the user move and resize a single rectangle in a WPF program. This example extends that one to let you move and … Continue reading

Posted in controls, graphics, wpf, XAML | Tagged , , , , , , , , , , , | Leave a comment

Display database records without data binding in C#

Many programs use data binding to display database records. That method is easy (at least as far as the code you write is concerned), but it’s not very flexible. This example shows how you can display database records without data … Continue reading

Posted in controls, database, lists, user interface | Tagged , , , , , , , , , , , , , | 1 Comment

Initialize lists from databases without binding in C#

Note that this is a very manual way to initialize lists. Often you can display data more easily by using data binding. In this example, I added the Access database file Books.mdb to the project and set its “Copy to … Continue reading

Posted in controls, database, lists, user interface | Tagged , , , , , , , , , , , , | 1 Comment