什么是 resx 文件中的椽子?

What are rafters for in resx files?

在 resx 文件中,我看到一些元素以 2 个椽子为前缀,如下所示:

  <data name=">>txtSourcePath.Name" xml:space="preserve">
    <value>txtSourcePath</value>
  </data>

这是什么意思?

如果您尝试通过 Managed Resource Editor 添加这样的 属性,您将收到一条错误消息:"The resource name is not a valid identifier".

但我发现的是

<data name="&gt;&gt;txtSourcePath.Name" xml:space="preserve">
  <value>txtSourcePath</value>
</data>

如果您将 属性 网格中表单的 "Localizable" 属性 设置为 true,则使用此选项。在这种情况下,将创建一个带有尖括号的 .resx 文件,并通过调用 resources.ApplyResources().

在 Designer.cs 文件中应用这些值

看来您的表单使用了某种本地化。