= DefaultNamespace.Subfolder.Strings VB.NET 在 VB.NET 中就很简单了,它自动给嵌入资源添加 root namespace。不管你在哪个子文件夹中放置资源文件,资源文件的完整名永远是 root namespace + base name。 根据上面的描述,如果我们使用 C#,用 VS.NET 在 NewFolder 这个子文件夹中添加了一个叫 Images.resources 的资源文件,那么我们应该用以下代码获取这些资源,假设 default namespace 是 MyDefault: ResourceManager res = new ResourceManager("MyDefault.NewFolder.Images", this.GetType().Assembly); 但如果我们用 VB.NET 的话,就应该这样: Dim res As New ResourceManager("MyDefault.Images", Me.GetType().Assembly)
数据载入中...
页码:[1] [2] [3] [4] [5] [6] 第6页、共6页 |