如何从C#嵌入式资源获取文件夹名称 [英] How Do I Get Folder Names From C# Embedded Resource

查看:283
本文介绍了如何从C#嵌入式资源获取文件夹名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以文件系统订购资源的方式订购资源.我无法在名称上进行string.split分割,因为文件夹之间用."分隔.字符,而不是'\'字符.这意味着文件夹或文件名中包含任何句点将破坏排序.

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?

推荐答案

这将为您提供所有资源的字符串数组.

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

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

这篇关于如何从C#嵌入式资源获取文件夹名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆