ResourceExpressionFields.ClassKey 屬性

定義

取得剖析的資源運算式之類別識別碼。

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

屬性值

String,包含類別識別碼,如果尚未設定類別識別碼則為 Empty

備註

這個方法會傳回已剖析資源運算式的類別索引鍵。 類別索引鍵代表資源檔的名稱,而且是在格式 <%$ Resources: [Namespace.]ClassKey, ResourceKey $> 的運算式中,在逗號 (,) 之前指定的值。 資源類別的命名空間值是選擇性的。 提供命名空間時,命名空間和類別索引鍵會在 屬性中 ClassKey 傳回。 類別索引鍵不能包含 DBCS) (空格或雙位元組字元集。

若要參考名為 Financial.resx 的資源檔或當地語系化版本,例如 Financial.en-GB.resx,您會包含資源運算式 <%$ Resources: Financial, ResourceKey %> 。 剖析之後, ClassKey 屬性會傳回 「Financial」 做為其值。

警告

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

適用於

另請參閱