Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any performance gain when using features from C# 6.0?

Do C# 6.0 features (like expression-bodied method-like members, using static, null-conditional operator or string interpolation) have any impact on the performance of a program or at least the compiling time? I like the new features but I was asking myself when using them if there is any performance gain/issue.

like image 935
diiN__________ Avatar asked Jan 29 '26 02:01

diiN__________


1 Answers

Not really. The new features are merely syntactic sugar for things already possible in C#.

The code generated by the new features, like the null-propagation operator, eventually yield the same C# code as you would already have had before.

It does make you better performing and possibly the code quality better, which is a good thing.

like image 60
Patrick Hofman Avatar answered Jan 30 '26 16:01

Patrick Hofman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!