ResourceExpressionFields.ClassKey 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得解析後資源運算式的類別金鑰。
public:
property System::String ^ ClassKey { System::String ^ get(); };
public string ClassKey { get; }
member this.ClassKey : string
Public ReadOnly Property ClassKey As String
屬性值
String A 包含類別鍵,或Empty若類別鍵尚未設定。
備註
此方法回傳解析後資源表達式的類別鍵。 類別鍵代表資源檔案的名稱,是形式為 <%$ Resources: [Namespace.]ClassKey, ResourceKey $>的表達式中逗號(,)前指定的值。 資源類別的命名空間值為可選。 當提供命名空間時,該命名空間與類別鍵會在屬性 ClassKey 中回傳。 類別鍵不能包含空格或雙位元組字元集(DBCS)。
參考名為 Financial.resx 的資源檔案,或是本地化版本如 Financial。en-GB.resx,你會包含資源運算式 <%$ Resources: Financial, ResourceKey %>。 解析後, ClassKey 該資產會回傳「財務」作為其價值。
謹慎
敏感資訊不應儲存在資源檔案中。