RosettaCodeData/Task/Copy-a-string/F-Sharp/copy-a-string.fs

7 lines
269 B
Forth

let str = "hello"
let additionalReference = str
let deepCopy = System.String.Copy( str )
printfn "%b" <| System.Object.ReferenceEquals( str, additionalReference ) // prints true
printfn "%b" <| System.Object.ReferenceEquals( str, deepCopy ) // prints false