How to get 'System.Type' of the module?
For example module:
module Foo = let bar = 1
And this does not work:
printfn "%s" typeof<Foo>.Name
Error is:
The type 'Foo' is not defined
You could add a marker type to the module and then discover the module's type from that:
module Foo = type internal Marker = interface end let t = typeof<Marker>.DeclaringType
2.1m questions
2.1m answers
60 comments
57.0k users