Since I don't know the term that applies to this, I am not sure what to search for existing comments on this.
I recently wasted a ton of time with an expression body similar to:
public SomeListViewModel SearchSomeModel => new ShowSomeViewModel{...};
When I tried to set values such as:
SearchSomeModel.Property = 12345;
It acted like all was good. But the actual value never changed. When I instead inserted a {get;} as in:
public SomeListViewModel SearchSomeModel {get;} = new ShowSomeViewModel{...};
It worked correctly.
The funny thing is that if this starts out as a normal get (with a get {return ..} then ReSharper(?) offers to convert it to the first version.
Anyway, I want to understand the difference between the two (no, not at a CLR level) but just to a) know how to refer to each in it's proper terms and b) why one works and the other just pretends to work.
Thanks!