从嵌入式资源获取Mime [英] Get Mime from Embedded Resource
问题描述
你好
我有一些嵌入资源,我需要获取它们的mime类型.
I have a few embed resources and I need to get their mime types.
我尝试了以下操作:
String []名称= Assembly.GetExecutingAssembly().GetManifestResourceNames();
foreach(名称中的字符串名称){
var a = Assembly.GetExecutingAssembly().GetManifestResourceInfo(name);
使用(Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)){
}
String[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();
foreach (String name in names) {
var a = Assembly.GetExecutingAssembly().GetManifestResourceInfo(name);
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) {
}
但是我无法找到一种获取资源mime类型的方法.
However I am not able to find a way to get the resources mime types.
有什么想法吗?
谢谢
米格尔(miguel)
Miguel
推荐答案
好奇的是您提到的MIME类型是什么?
Just curious what is the mime types that you are mentioning?
您在看这个吗?
http://msdn.microsoft.com/en-us/library /system.net.mime.contenttype.aspx
chanmm
这篇关于从嵌入式资源获取Mime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!