ResourceExpressionFields.ResourceKey 属性
定义
获取经过分析的资源表达式的资源键。Gets the resource key for a parsed resource expression.
public:
property System::String ^ ResourceKey { System::String ^ get(); };
public string ResourceKey { get; }
member this.ResourceKey : string
Public ReadOnly Property ResourceKey As String
属性值
包含资源键的 String;或者如果尚未设置资源键,则为 Empty。A String containing the resource key, or Empty if the resource key has not been set.
注解
此方法返回已分析的资源表达式的资源键。This method returns the resource key for a parsed resource expression. 资源键是在窗体<%$ Resources: ClassKey, ResourceKey %>
的表达式中的逗号 (,) 之后指定的值。The resource key is the value specified after the comma (,) in an expression of the form <%$ Resources: ClassKey, ResourceKey %>
. ResourceKey属性标识映射到类键的资源文件中的特定键/值对。The ResourceKey property identifies a particular key/value pair within the resource file mapped to the class key. 例如, 如果名为 "财经" 的文件包含一个名Currency
为的密钥, 则可以使用资源表达式<%$ Resources: Financial, Currency %>
来指定该值。For example, if a file named Financial.resx contains a key called Currency
, that value could be specified with the resource expression <%$ Resources: Financial, Currency %>
. 分析后, ResourceKey属性会将 "Currency" 返回为其值。After parsing, the ResourceKey property would return "Currency" as its value.
注意
不应将敏感信息存储在资源文件中。Sensitive information should not be stored in a resource file.