Using delimiters for numeric literals in C# 7.0

Say you need to work with relatively large numbers in your C# code:

int number = 3452123;

Wouldn’t it be nice if you could use some kind of delimiter to indicate the millions, thousands etc? Like in 3,452,123? In C# 7.0 the underscore provides a solution for this:

int number = 3_452_123;

The underscores will be ignored by the compiler.

View all various C# language feature related posts here.


A great site

Elliot Balynn's Blog

A directory of wonderful thoughts

HarsH ReaLiTy

A Good Blog is Hard to Find

Softwarearchitektur in der Praxis

Wissenswertes zu Webentwicklung, Domain-Driven Design und Microservices

Technology Talks

on Microsoft technologies, Web, Android and others

Software Engineering

Web development

Disparate Opinions

Various tidbits

chsakell's Blog


Once Upon a Camayoc

Bite-size insight on Cyber Security for the not too technical.

Guru N Guns's

OneSolution To dOTnET.

Johnny Zraiby

Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

%d bloggers like this: