String.Empty 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表空字串。 此欄位僅供讀取。
public: static initonly System::String ^ Empty;
public static readonly string Empty;
staticval mutable Empty : string
Public Shared ReadOnly Empty As String
欄位值
備註
此欄位的值為零長度字串「」。
在應用程式程式碼中,此欄位最常用於將字串變數初始化為空字串的指派。 要測試字串 null 的值是 或 String.Empty,請使用以下 IsNullOrEmpty 方法。