3

In F# how do you assign the entire contents of a file (text file where it's 100% string type) to a variable?

5

1 Answer 1

6

You'd just a let binding, and the same System.IO functions that are normally available:

let theVariable = System.IO.File.ReadAllText pathToFile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.