比较字符串为null – 为什么Resharper认为这总是假的?

我在自定义MembershipProvider中有这个代码:

public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config) { if (config == null) throw new ArgumentNullException("config"); if (name == null) name = "MyCustomMembershipProvider"; ... } 

Resharper标记了第二个if-Statement并告诉我,它总是会评估为false。

resharper消息

但为什么这总是评价为假? 我可以轻松地将null作为参数传递给方法。

这是一个错误还是Resharper就在这里?

PS 1:我使用Resharper 6.1
PS 2:我知道使用string.IsNullOrEmpty()无论如何都会去这里。 我只是好奇。

可能,参数name标记为[NotNull] 。 Resharper附带了常见BCL类的合同元数据。