JsonSerializerOptions.NewLine 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當 是 true時,會取得或設定新的行串以使用WriteIndented。
預設為 NewLine 的值。
public:
property System::String ^ NewLine { System::String ^ get(); void set(System::String ^ value); };
public string NewLine { get; set; }
member this.NewLine : string with get, set
Public Property NewLine As String
屬性值
例外狀況
當新的行串為 null時,擲出 。
當新的行列不是 \n 或 \r\n時,會拋出 。
此特性是在序列化或反序列化發生後設定的。