JsonSerializerOptions.NewLine 屬性

定義

取得或設定 WriteIndentedtrue時要使用的新行字串。

預設值為 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時擲回。

如果在串行化或還原串行化發生之後設定這個屬性,則擲回 。

適用於