As far as I know there is not a significantly more elegant way to write the following....
string src;
if((ParentContent!= null)
&&am
Correct me, if I am wrong, but this could be solved using C# 6.0's null-conditional operator:
string src = ParentContent?.Image("thumbnail")?.Property("src")?.Value;
If src is already in used before this value assignment, you could use it as follows:
string src = ....;
// ...
src = ParentContent?.Image("thumbnail")?.Property("src")?.Value ?? src;
// ...