ResourceExpressionFields.ResourceKey ResourceExpressionFields.ResourceKey ResourceExpressionFields.ResourceKey ResourceExpressionFields.ResourceKey Property

定義

取得剖析的資源運算式之資源索引鍵。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,包含資源索引鍵,如果尚未設定資源索引鍵則為 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. 例如, 如果名為財務 .resx 的檔案包含名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.

適用於

另請參閱