Reporter | Ivan Serduk (IvanSerduk) |
---|---|
Created | Apr 11, 2018 7:04:49 PM |
Updated | Apr 11, 2018 7:04:49 PM |
Subsystem | Code Analysis - C# |
Assignee | Ivan Serduk (IvanSerduk) |
Priority | Normal |
State | Submitted |
Type | Bug |
Fix version | 2018.2 |
Affected versions | No Affected versions |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
using System;
using JetBrains.Annotations;
public class Class2
{
[CanBeNull] private MyForm myForm;
public void Test()
{
if (myForm == null)
return;
myForm.Activated += obj => Activated();
var s = myForm.ToString(); // false possible NRE
}
private void Activated() { }
}
public class MyForm
{
public event Action<object> Activated;
}