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

nullがらみ #4

Closed
ufcpp opened this issue Apr 7, 2015 · 1 comment
Closed

nullがらみ #4

ufcpp opened this issue Apr 7, 2015 · 1 comment

Comments

@ufcpp
Copy link
Owner

ufcpp commented Apr 7, 2015

http://ufcpp.net/study/csharp/rm_nullusage.html ちゃんと書く。

null, nullable, ?. の話はOOPの章、コンストラクターの直後くらいに1ページあってもいいかも。

?. のショートサーキット動作の話も書く。
. よりも優先度低くて、右結合( ?. の右側に . がつながってた場合、 ?. が null 判定受けた時点でそこから先は評価されない)。

?. がショート サーキットなせいで、呼んで欲しい拡張メソッドが呼ばれなくなるっぽい。そういえば。
a?.Method().ExtensionMethod()
拡張メソッドは左辺がnullの状態で呼べるし、意図してnullのまま呼びたい時もある。
dotnet/roslyn#3250

ソフトウェアデザイン2016/4号寄稿の記事も一部使えそう

@ufcpp
Copy link
Owner Author

ufcpp commented Oct 21, 2018

済んでた。

@ufcpp ufcpp closed this as completed Oct 21, 2018
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

No branches or pull requests

1 participant