簡體   English   中英

如何使'printfn“%A”`打印完整的復雜結構?

[英]How can i make `printfn “%A”` print full complex structures?

當我通過printfn "%A"打印復雜的結構化值時,輸出將被截斷,如下例所示。

對於fsi ,有一些選項(即fsi.PrintLength <- System.Int32.MaxValue )來改變這種行為。

如何在簡單的控制台應用程序中獲得完整的結構?

seq [[adspath, {name = "adspath"; typ = "System.String"; count = 1; value = "GC://...";}]; [c, {name = "c"; typ = "System.String"; count = 1; value = "DE";}]; [cn, {name = "cn"; typ = "System.String"; count = 1; value = "I....";}]; [co, {name = "co"; typ = "System.String"; count = 1; value = "DE";}]; ...]

因為我不能刪除這里的問題是答案。 問題是序列沒有被定性化。 在我的例子中,我有一個System.Collections.Generic.IDictionary<string,<T>>類型的值System.Collections.Generic.IDictionary<string,<T>>

v 
|> Seq.toList
|> printfn "%A"

解決它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM