通过


ResourceExpressionFields.ResourceKey 属性

定义

获取已分析的资源表达式的资源键。

public:
 property System::String ^ ResourceKey { System::String ^ get(); };
public string ResourceKey { get; }
member this.ResourceKey : string
Public ReadOnly Property ResourceKey As String

属性值

String包含资源密钥,或者Empty尚未设置资源密钥。

注解

此方法返回已分析的资源表达式的资源键。 资源键是在窗体 <%$ Resources: ClassKey, ResourceKey %>的表达式中以逗号 (,) 指定的值。 该 ResourceKey 属性标识映射到类键的资源文件中的特定键/值对。 例如,如果名为 Financial.resx 的文件包含名为 Currency 的键,则可使用资源表达式 <%$ Resources: Financial, Currency %>指定该值。 分析后,该 ResourceKey 属性将返回“Currency”作为其值。

注意

敏感信息不应存储在资源文件中。

适用于

另请参阅