public static string GetMimeType(AssetListType assetListType) { object[] attributes = assetListType.GetType().GetCustomAttributes(typeof (MimeTypeAttribute), false); return attributes.Length == 0 ? String.Empty : ((MimeTypeAttribute) attributes[0]).MimeType; } }