Monthly Archives: April 2018

Find duplicate files in C#, Part 4 of 4

The last three posts described an application that searches for duplicate files and removes them. The program seems to work fairly well, at least for small test directories. When I tried it on a directory containing around 8,000 files, however, … Continue reading

Posted in algorithms, cryptography, files, system, tools | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Find duplicate files in C#, Part 3 of 4

The last two posts described an application that searches for duplicate files and removes them. This post explains how the program removes the files when you click the Delete Selected button. When you click the button, the following code executes. … Continue reading

Posted in algorithms, cryptography, files, system, tools | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Find duplicate files in C#, Part 2 of 4

The previous post Find duplicate files in C#, Part 1 of 4 explained how the example uses a LINQ query to select files grouped by hash code. This post explains how the program displays the files’ contents and how the … Continue reading

Posted in algorithms, cryptography, files, system, tools | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Find duplicate files in C#, Part 1 of 4

This example lets you find and remove duplicate files. It’s fairly complex, so I’m going to cover it’s more interesting pieces in several posts. I won’t cover some of the less interesting pieces at all. Enter a directory path or … Continue reading

Posted in algorithms, cryptography, files, system, tools | Tagged , , , , , , , , , , , , , , , , , , | 2 Comments

Write a CSV file from an array in C#

The example Read a CSV file into an array in C# shows how to load a CSV file into a two-dimensional array of strings. This example does the opposite: it saves a two-dimensional array of strings into a CSV (comma-separated … Continue reading

Posted in database, files, strings | Tagged , , , , , , , , , , , , , , | Leave a comment

Calculate hash codes for a file in C#

Hash codes are codes that concisely represent files or other chunks of data. The basic idea is to combine the data’s bytes in ways so that two different files are likely to have different hash codes. If you save a … Continue reading

Posted in algorithms, cryptography, files | Tagged , , , , , , , , , , , , | 1 Comment

Copy a directory hierarchy into the executable directory in C#

The example Copy files into the executable directory in C# explains how to make Visual Studio copy a file into the executable directory when it builds a project. That makes it easy for the executable to find the file when … Continue reading

Posted in files, miscellany, system | Tagged , , , , , , , , , , , , , , , | Leave a comment

Use an animated cursor in C#

This example doesn’t show how to use an animated cursor file such as an animated gif or png file. As far as I know, C# doesn’t support that kind of cursor. What this example does do is show how to … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , | Leave a comment

Display database pictures in a ListView control in C#

This example shows how you can display database pictures in a ListView control. My previous post, Create ListView icons at run time in C#, explained how to make images at runtime to display in a ListView control. This example follows … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , , , , , , , , , , | 9 Comments

Create ListView icons at run time in C#

The example Display large and small ListView icons in C# explains how to display ListView icons next to items. Basically, you place the images in two ImageList controls, set the ListView control’s LargeImageList and SmallImageList properties to those two controls, … Continue reading

Posted in controls, drawing, graphics | Tagged , , , , , , , , , , , , , , , , | Leave a comment