❔ Are these properties the same? `{ get => x; }` vs `{ get; } = x;`
I would like to know if these have any other differences besides the syntax.
Case 1:
Case 2:
In my code below I have other properties that use the 2nd case, but that's because of more specific reasons, for example:
I'm not sure which one would be better in the long run (if there are no other differences).
Previously I always used the 1st case, but here 2nd case seems more consistent with properties below, so this leaves a little confused as I never even thought about the 2nd case.
Case 1:
public int TileSize { get; } = 64;Case 2:
public int TileSize { get => 64; }In my code below I have other properties that use the 2nd case, but that's because of more specific reasons, for example:
I'm not sure which one would be better in the long run (if there are no other differences).
Previously I always used the 1st case, but here 2nd case seems more consistent with properties below, so this leaves a little confused as I never even thought about the 2nd case.