How Do I Get Folder Names From C# Embedded Resource

心不动则不痛 提交于 2019-12-11 09:33:33

问题


I want to order resources the way a filesystem would order them. I can't do a string.split on the name, because the folders are seperated by '.' characters, not '\' characters. This means that having any periods in folder or file names would break the sort.

Is there any way to change the seperator character, or get a different breakdown for the original location of an embedded resource?


回答1:


This will get you a string array of all the resources.

System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();


来源:https://stackoverflow.com/questions/11849917/how-do-i-get-folder-names-from-c-sharp-embedded-resource

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!