c#8 :
first = (T)(tIsString ? stringValue : JsonConvert.DeserializeObject<T>(property.Value.ToString()) ?? default(T));
you don't need C# 8 to use the coalesce ?? operator Only the ??= operator is part of C# 8
It says that is a feature of c# 8
why don't you just upgrade your language version? just add <LangVersion>8.0</LangVersion> to your csproj right after <TargetFramework>. you don't have to change anything else. The additional language features will just work.
If only it was that simple... Wait... it *is* that simple!
Обсуждают сегодня