C# Null propagation - Where does the magic happen?

后端 未结 2 557
青春惊慌失措
青春惊慌失措 2020-12-19 09:20

Null propagation is a very nice feature - but where and how does the actual magic happen? Where does frm?.Close()

2条回答
  •  有刺的猬
    2020-12-19 10:04

    Does it actually get changed to that kind of code at all?

    Well, yes, but at the IL level, not the C# level. The compiler emits IL code that roughly translates to the equivalent C# code you mention.

提交回复
热议问题