The significant difference between the two is that member val represents an expression that evaluates only once during instance initialization. Consequently,
type Person(fname, lname) = member val Name = fname + lname
So, the first consideration is performance.
Another consideration is based on two limitations of auto properties:
- you can use them only in types with primary ctor;
- they cannot be
virtual
source share