Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Convert the apache mime.types file to C# Dictionary<string, string> keyed by file extension.
branch: master
Failed to load latest commit information.
Properties Initial commit
bin/Debug Update README
ApacheMimeTypes.cs Initial commit
ApacheMimeTypesToDotNet.csproj Initial commit
ApacheMimeTypesToDotNet.sln Initial commit
Program.cs Initial commit Update

Convert the Apache mime.types file to C# Dictionary keyed by file extension. See ApacheMimeTYpes.cs for example output. The source file is located here:

And is used per the permission at the top:

# This file maps Internet media types to unique file extension(s).
# Although created for httpd, this file is used by many software systems
# and has been placed in the public domain for unlimited redisribution.

The generated code looks like this:

using System;
using System.Collections.Generic;

namespace ApacheMimeTypes
    class Apache
        public static Dictionary<string, string> MimeTypes = new Dictionary<string, string>
            { "123", "application/vnd.lotus-1-2-3" },
            { "3dml", "text/vnd.in3d.3dml" },
            { "3g2", "video/3gpp2" },

The full output is here:

Something went wrong with that request. Please try again.