Author Archives: Rod Stephens

Use the automatic code converters at developerFusion to convert C# code into Visual Basic, Ruby, and Python

The developerFusion web site provides code converters that let you translate between C#, Visual Basic, Ruby, and Python. One of the most important uses for reflection is analyzing code to figure out what it does. Once you know what the … Continue reading

Posted in programs, reflection, syntax | Tagged , , , , , , , , , , , , , , , | 1 Comment

Add LINQ to autocomplete in C#

This example adds LINQ to the example Improve autocomplete suggestion in C#. It adds LINQ in two places: when it loads the list of words and when the program searches for the best matches that begin with a particular letter. … Continue reading

Posted in algorithms, LINQ, strings | Tagged , , , , , , , , , , , , , , | Leave a comment

Improve autocomplete suggestion in C#

This example improves on the example Suggest autocomplete words in C#. The previous example loads all of its words into a big array. Then, to find the words that start with a particular letter, the program uses a binary search … Continue reading

Posted in algorithms, strings | Tagged , , , , , , , , , , , , , , | 1 Comment

Suggest autocomplete words in C#

This example shows one way that a program can suggest words for the user. When I type something on my phone, it displays a list of possible words for autocomplete below the editing area. For example, if I type “gping” … Continue reading

Posted in algorithms, strings | Tagged , , , , , , , , , , , , , , | 5 Comments

Build an MRU list in C#

An MRU list (most recently used file list) displays in the File menu the files that a program has used most recently. If the user selects a file from the menu, the program reopens that file. This example builds an … Continue reading

Posted in files, programs, registry | Tagged , , , , , , , , , , , , , | 3 Comments

Useful tools and links

This page lists some useful tools and links that I visit regularly. If you want to recommend others, please post them in the comments. Tools Programming Sites Forums Tools @icon sushi Image to icon converter that supports the mask editor … Continue reading

Posted in miscellany, tools | Tagged , , , , , , , , | Leave a comment

Get information about Windows shortcuts in C#

This post explains how to get information about Windows shortcuts. The post has two parts. The first explains how to get the information. The second explains how to create shortcuts. Getting Shortcut Information This example uses the following GetShortcutInfo method … Continue reading

Posted in system | Tagged , , , , , , , , , | 3 Comments

List the shortcuts in the computer’s network neighborhood in C#

This example uses the Windows Script Host to list shortcuts in the network neighborhood. Before the program can use the Windows Script Host, you must add a reference to the COM object “Windows Script Host Object Model.” To make using … Continue reading

Posted in miscellany, network | Tagged , , , , , , , , , , , | 2 Comments

Solve the “Find the squares in C#” puzzle

This post shows how to solve the puzzle Puzzle: Find the squares in C#. The program howto_square_puzzle_solution uses the following code to define the puzzle’s 11 solutions. // Small squares. Solutions.Add(new int[] { 0, 1, 4, 3 }); Solutions.Add(new int[] … Continue reading

Posted in algorithms, games, mathematics | Tagged , , , , , , , , , , , | 1 Comment

Puzzle: Find the squares in C#

The example Puzzle: Find the equilateral triangles in C# was fun, at least for me, so here’s another puzzle. This time your goal is find all of the squares that you can make using the red dots shown here. If … Continue reading

Posted in algorithms, games, graphics, mathematics | Tagged , , , , , , , , , , , | 1 Comment