且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Int和String F#

更新时间:2023-09-29 08:44:52

空字符串 isn'与 x 兼容,它是 int 类型。您可以使用

Empty string "" isn't compatible with x which is of int type. You can use

let int2String x = sprintf "%i" x

let int2String (x: int) = string x