I recently asked this question on SO, which was closed as a duplicate of another question. In the process of trying to explain and come up with reasoning as for why it's not a duplicate, I managed to track down the answer to the original question.
From a duplicate viewpoint, my question is trying to figure out the discrepancy between what I was seeing in VS2019 and Unity. It wasn't related to the problematic code found in the linked question.
In fact, if someone sees the same issue that I did, and decides to go to the linked question, they'll find that the "problematic" code works exactly as my question describes.
Lastly, the linked question isn't related to Unity.
Trying to understand this, I did end up figuring out the reason for what I'm seeing (though maybe not the entire underlying cause).
VS2019 is seeing <LangVersion>latest</LangVersion>
in the csproj file and trying to apply C# 8.0 features, which allows specifically the code that I wrote. .Net Standard 2.0 is listed here as pointing to C# 7.3, which doesn't support the feature, which explains why Unity and the person who closed the question are seeing errors in their compilation. (No idea why my Unity project defaults to C#8). But again, I feel like this answer is significantly different than the linked question, pointing to them being different issues.
I would like to know what's the best way to update the question in case someone else runs into with the issue that I described: should I just tack the answer on to the bottom of the question, or try to get the duplicate unlinked and provide a self-answer (or some other course of action).