none
nameof operator doesn't work RRS feed

  • Question

  • 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.

    Thursday, September 12, 2019 5:51 PM

All replies