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

String,包含資源索引鍵,如果尚未設定資源索引鍵則為 EmptyA 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.

適用於

另請參閱