nameof operator doesn't work

J

JohnyL

I'm learning F#. Here's the code:

let f x =
let m = nameof x
m

[<EntryPoint>]
let main argv =
let x = f "z"
0

However, I get the following error: The value or constructor 'nameof' is not defined.

What I'm doing wrong?



There is no knowledge that is not power.

Continue reading...
 
Top