Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/331.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# .NET属性网格位置问题_C#_Localization - Fatal编程技术网

C# .NET属性网格位置问题

C# .NET属性网格位置问题,c#,localization,C#,Localization,我有一段代码来显示哪些部分可以由用户自定义 System.Attribute[] atts = new Attribute[] { new CategoryAttribute("Appearance"), new CategoryAttribute("Chart"), new CategoryAttribute("Image") }; uxPropertyGridChart.B

我有一段代码来显示哪些部分可以由用户自定义

System.Attribute[] atts = new Attribute[] {
                new CategoryAttribute("Appearance"),
                new CategoryAttribute("Chart"),
                new CategoryAttribute("Image")
            };
uxPropertyGridChart.BrowsableAttributes = new AttributeCollection(atts);
它与CultureInfo(“en-US”)配合得很好。但它会引发其他位置的异常(例如fr)。我很想知道为什么

有什么想法吗

编辑: 我把答案贴在下面,以防有人有同样的问题

谢谢,
Peter

属性部分必须是特定于位置的。因此,在我的例子中,“图表”应该在法语中改为“Graphique”。

了解异常信息是理解问题的第一步。耶,我忘了发布异常。你不必否决我的问题。不管怎样,我自己找到了答案。如果有人有相同的问题,请参见下文。向下投票的目的是鼓励海报提供足够的信息,以便为您的问题提供上下文,这有助于将来搜索相关问题并匹配例外情况。如果你公布例外情况,否决票就会消失。