Gong Solutions Logo

Accessing the Windows Shell Namespace from Code

This tutorial will show you how to carry out some common operations on the windows namespace in Visual Studio 2005 using the Gong Solutions Shell Library.

Creating a new project

Create a new Console Application in Visual Studio and add a reference to the Gong Solutions Shell Library to your project. For more details, click here.

Iterating over the items in a Shell Folder

using System; using GongSolutions.Shell; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { ShellItem folder = new ShellItem( Environment.SpecialFolder.MyDocuments); foreach (ShellItem item in folder) { Console.WriteLine(item.FileSystemPath); } } } }