Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何访问解决方案项?c#winforms_C#_Winforms - Fatal编程技术网

如何访问解决方案项?c#winforms

如何访问解决方案项?c#winforms,c#,winforms,C#,Winforms,如下图所示: 如何访问查询.resx 下面是.resx文件中的内容。我想得到这个值。 我认为这些资源没有打包到最终组装中 解决方案项应该只用于这些类型的文件 标准的visual studio添加项屏幕不允许您将资源文件直接添加到解决方案中 您正在使用Visual Studio Express(不支持解决方案文件夹)吗?否则,当你双击文件时会发生什么?双击它?右键单击并选择“打开方式…”?可能您注意到这些文件位于windows上的程序解决方案文件夹中?所以你必须访问地图,在那里你可以找到你的解

如下图所示:

如何访问
查询.resx

下面是.resx文件中的内容。我想得到这个值。

我认为这些资源没有打包到最终组装中

解决方案项应该只用于这些类型的文件

标准的visual studio添加项屏幕不允许您将资源文件直接添加到解决方案中


您正在使用Visual Studio Express(不支持解决方案文件夹)吗?否则,当你双击文件时会发生什么?双击它?右键单击并选择“打开方式…”?可能您注意到这些文件位于windows上的程序解决方案文件夹中?所以你必须访问地图,在那里你可以找到你的解决方案。你是如何理解他真正的要求的,我无法理解。干得好+祝你好运。
// Create a ResXResourceReader for the file items.resx.
ResXResourceReader rsxr = new ResXResourceReader(@"C:\Resource1.resx");

// Create an IDictionaryEnumerator to iterate through the resources.
IDictionaryEnumerator id = rsxr.GetEnumerator();

// Iterate through the resources and display the contents
foreach (DictionaryEntry d in rsxr)
{
    Console.WriteLine("Key: {0}  Value: {1}",     
                              d.Key.ToString(),d.Value.ToString());
}