Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that this argument is not null #218

Open
JohanLarsson opened this issue Jul 13, 2019 · 0 comments
Open

Check that this argument is not null #218

JohanLarsson opened this issue Jul 13, 2019 · 0 comments
Labels
analyzer Create an analyzer for this.

Comments

@JohanLarsson
Copy link
Collaborator

class Program
{
    public void CallMe()
    {
        Console.WriteLine(this?.ToString() ?? "NULL");
    }

    static unsafe void Main()
    {
        var a = (Action<Program>)typeof(Program).GetMethod(nameof(CallMe)).CreateDelegate(typeof(Action<Program>));
        a(null);
    }
}
@JohanLarsson JohanLarsson added the analyzer Create an analyzer for this. label Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer Create an analyzer for this.
Projects
None yet
Development

No branches or pull requests

1 participant