Do the null-conditional operator and interpolated strings syntax resolve to just syntactic sugar?
The null-conditional operator (?.
), which allows code clean-up through reducing "excessive" null
checking, and interpolated strings (("{X}, {Y}")
), which brings the arguments and format into one, are new features in C# 6.
Do these get compiled to their undesirable counterparts (i.e. the ugly code we sought to avoid)?
I apologize for the na?ve question, I don't have the best understanding of languages in general, but I'm curious if it would be possible to run these features on, say, C# 5.
I know this is the case with Java in some instances, is it true as well with these examples?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…