I have a structure that has a field called type
type
How do I access it in F #?
FROM#
struct A { int type; }
e #
let a = A() let myThing = a.type //error because type is a reserved keyword
How do I access the type A field?
A
You can use double A.``type`` to qualify it A.``type`` .
A.``type``
You access type as a static field. First, you need an instance of A :
let a = A() let x = a.``type``