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

WPF0042 warns on ArgumentNullException.ThrowIfNull #461

Open
Laniusexcubitor opened this issue Dec 14, 2023 · 0 comments · May be fixed by #463
Open

WPF0042 warns on ArgumentNullException.ThrowIfNull #461

Laniusexcubitor opened this issue Dec 14, 2023 · 0 comments · May be fixed by #463

Comments

@Laniusexcubitor
Copy link

Laniusexcubitor commented Dec 14, 2023

Currently WPF0042 warns on the following code:

public static void SetColumn(UIElement element, int value)
{
    ArgumentNullException.ThrowIfNull(element);

    element.SetValue(ColumnProperty, value);
}

ArgumentNullException.ThrowIfNull is new and preferred, see CA1510

PresentationFramework was already updated.

@Laniusexcubitor Laniusexcubitor changed the title WPF0042 warns on ArgumentNullException WPF0042 warns on ArgumentNullException.ThrowIfNull Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant