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

[Proposal] Null Event Binding and Unbinding #10939

Closed
neurospeech opened this issue Apr 28, 2016 · 2 comments
Closed

[Proposal] Null Event Binding and Unbinding #10939

neurospeech opened this issue Apr 28, 2016 · 2 comments
Labels
Area-Language Design Resolution-Duplicate The described behavior is tracked in another issue

Comments

@neurospeech
Copy link

var c = cp?.Content;
if(c != null){
    c.PropertyChanged += C_PropertyChanged;
}
if(c != null){
    c.PropertyChanged -= C_PropertyChanged;
}

Can be easily written as

cp?.Content?.PropertyChanged += C_PropertyChanged;
cp?.Content?.PropertyChanged -= C_PropertyChanged;
@alrz
Copy link
Contributor

alrz commented Apr 28, 2016

#1276

@gafter gafter added Resolution-Duplicate The described behavior is tracked in another issue Area-Language Design labels Apr 28, 2016
@gafter gafter closed this as completed Apr 28, 2016
@gafter
Copy link
Member

gafter commented Apr 28, 2016

This is a duplicate of #1276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Language Design Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

2 participants