CodeGenerator.ValidateIdentifier(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
若指定的字串不是有效識別碼,會拋出例外。
protected:
virtual void ValidateIdentifier(System::String ^ value);
protected virtual void ValidateIdentifier(string value);
abstract member ValidateIdentifier : string -> unit
override this.ValidateIdentifier : string -> unit
Protected Overridable Sub ValidateIdentifier (value As String)
參數
- value
- String
用來測試有效性的識別碼作為識別碼。
例外狀況
指定的識別碼無效或與保留或語言關鍵字衝突。