RefactoringEssentials
RefactoringEssentials copied to clipboard
Merge sequential checks, replacing them with a null conditional operator
trafficstars
ReSharper supports this very useful refactoring:
if (a != null && a.b != null)
{
}
to
if (a ?.b != null)
{
}
In Resharper this works with arbitrarily long sequential checks, e.g. if (a?.b?.c?.d != null)
This is sorely missed in RefactoringEssentials. Be great to have it. Cheers.