C# 7.0 Feature : Digit Separator








C#7.0 comes with another new feature called Digit separator.
Now you can separate the digits by a separate '_'.

You can put them wherever you want between digits according to your readability.
Separators have no effect on the value.

Example:

var num = 1_000_000; 
var hex = 0xAB_CD_EF;


'num' variable has value 1000000 and 'hex' variable has value ABCDEF.



Next: C# 7.0 Feature : Improvements Out Variables

Review: whats new in C#7.0
C# 7.0 Feature : Digit Separator C# 7.0 Feature : Digit Separator Reviewed by kamal kumar das on January 04, 2017 Rating: 5

No comments:

ads 728x90 B
Powered by Blogger.