Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 F# 中有一个函数,我在其中获取一个int值并将其int作为string.
int
string
let inttostring (x:int):string = ""+x
我无法让 ToString 工作。任何帮助,将不胜感激。
空字符串与类型""不兼容。您可以使用xint
""
x
let int2String x = sprintf "%i" x
或者
let int2String (x: int) = string x