R# 4.0.739 Incorrect "possible null reference" warning

Apologies; jira won't let me in.

I have the following code;

ServicesSection servicesSection =
as ServicesSection;

if (null == servicesSection ||
null == servicesSection.ElementInformation ||
!servicesSection.ElementInformation.IsPresent ||
null == servicesSection.ElementInformation.Properties ||
servicesSection.ElementInformation.Properties.Count == 0 ||
null ==
throw new ConfigurationErrorsException("cannot find valid
services configuration section");

ServiceElementCollection servicesCollection =
as ServiceElementCollection;

servicesSection.ElementInformation.Properties[string.Empty].Value is flagged
as a possible null reference exception when I believe I've performed all the
checks I can. It's complaining about the possible of ElementInformation
being null, which as you can see from the checks I am specifically looking

Please sign in to leave a comment.