Skip to main content

Posts

Showing posts from April, 2016

List of Mime Type of file in C#

private string GetFileMimeType(string extension)         {             char[] arr = extension.ToCharArray();             arr = Array.FindAll<char>(arr, (c => (char.IsLetterOrDigit(c))));             extension = new String(arr).ToLower();             Dictionary<string, string> lstMimeTypes = new Dictionary<string, string>               {                 {"ai", "application/postscript"},                 {"aif", "audio/x-aiff"},              ...