Monthly Archives: January 2012

Get information about a Windows shortcut in C#

The GetShortcutInfo method shown in the following code gets information about a shortcut. // Get information about this link. // Return an error message if there’s a problem. private string GetShortcutInfo(string full_name, out string name, out string path, out string … Continue reading

Posted in system | Leave a comment

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 it, you must add a reference to the COM object “Windows Script Host Object Model.” To make using that library easier, … Continue reading

Posted in miscellany, network | 1 Comment

Find and display solutions to the “find the squares” puzzle in C#

This post shows how to solve the puzzle Puzzle: find the squares in C#. The howto_square_puzzle_solution program 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 | Leave a comment