Click here to Skip to main content
12,755,775 members (39,193 online)
Click here to Skip to main content


135 bookmarked
Posted 4 Jan 2007

System File Association

, 16 Mar 2007
This article describes the use of several custom C# classes that can be used to create, view, edit and delete Windows file associations.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BrendanGrant.Helpers.FileAssociation.Example
   public partial class NewExtensionDialog : Form
      public NewExtensionDialog()

      public string Extension
            if (!extensionTextBox.Text.StartsWith("."))
               extensionTextBox.Text = "." + extensionTextBox.Text;

            return extensionTextBox.Text;
            if (!value.StartsWith("."))
               value = "." + value;

            extensionTextBox.Text = value;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Brendan Grant
Web Developer
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170217.1 | Last Updated 16 Mar 2007
Article Copyright 2007 by Brendan Grant
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid