You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Analyzer 'SonarAnalyzer.Rules.CSharp.UseValueParameter' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
(Could not catch stack trace).
using System;
namespace ConsoleApp8
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
}
public Program(string id)
{
if (string.IsNullOrEmpty(id)) throw new ArgumentNullException(nameof(id));
}
private string id;
public string Id
{
get => null;
set => id = value;
}
}
}
The text was updated successfully, but these errors were encountered:
Evangelink
changed the title
NullReferenceException in UseValueParameter [VS 15.5 only]
Fix S3237: Rule should not throw NullReferenceException when using expression body accessor
Dec 18, 2017
Hello,
VS 15.5, SonarAnalyzer.CSharp 6.4 or 6.7
The text was updated successfully, but these errors were encountered: