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」 做為其值。

警告

敏感性資訊不應儲存在資源檔中。

適用於

另請參閱