|
|
|
|
|
by nonethewiser
732 days ago
|
|
> I generally won’t remove a property, but mark it as obsolete and stop using it. Presumably because loading will break? > - If I’ve added a new Boolean property, I’d tend to name it such that it defaults to false, or if it must default to true, have it stored in a nullable boolean, and if it loads as null (from an older instance of the type), set it to the default. Why? |
|
Similarly, `default(Nullable<Boolean>)` is (wait for it) null, so you can do "oldVal ?? true".