English 中文(简体)
如何在C#和VB找到缺省资源档案的名称。 净额
原标题:How to find the name of the default resources file in C# and VB.Net?

我发明了类似于工具箱BitmapAttribute的特性,使你能够把Icon或图像与一个类别联系起来。

为了表达形象、资源档案的基名、某种类型(为发现集会)以及资源名称,将传给特性构造者。 我随后利用资源管理获得资源:

Dim rm = New ResourceManager(ResourceFileBaseName, passedType.Assembly)
Dim obj = rm.GetObject(resourceName)

这是罚款,但我只想通过建筑商的资源名称,删除资源档案基名。 然后,我将从缺省资源档案中提取资源。 当我说缺省资源档案时,我指的是你开始视觉演播室、打开财产页和点击资源表的时候。

问题是,在VB的发展中。 网上,基名是根纳梅空间。 资源,在C#中开发时,基名是根名。 财产。 资源

在什么地方可以有计划地找到缺省资源档案的名称?

Update

我可以做的是获得一份所有资源名单:

t.Module.Assembly.GetManifestResourceNames

然后,我可以找到一个用资源结束的名字。 用于建立资源档案名称的资源和使用。

然而,这是效率低下的,但我怀疑这是这样做的唯一途径。

问题回答

www.un.org/Depts/DGACM/index_spanish.htm 您可以尝试议会的所有资源档案,并测试icon是否具备。

很难发现缺省资源档案。 例如,我总是把我的C#项目的资源档案移至根本名称空间。 此外,用户可能有意将图像放在不同的资源档案中。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签