- C# 7 and .NET Core Cookbook
- Dirk Strauss
- 88字
- 2021-07-03 00:11:54
How to do it...
- Add the following lines of code to your project. It is clear that the newNum literal is easier to read, especially if you read it in groups of three.
var oldNum = 342057239127493;
var newNum = 342_057_239_127_493;
WriteLine($"oldNum = {oldNum} and newNum = {newNum}");
- If you run the console application, you will see that the values of the two number literals are exactly the same:

- The same logic is true for binary literals. You can now express them as follows:
var binLit = 0b1010_1100_0011_0010_0001_0000;
推薦閱讀
- Photoshop智能手機(jī)APP UI設(shè)計(jì)之道
- SQL學(xué)習(xí)指南(第3版)
- 算法大爆炸:面試通關(guān)步步為營(yíng)
- Java加密與解密的藝術(shù)(第2版)
- Java開發(fā)入行真功夫
- Ray分布式機(jī)器學(xué)習(xí):利用Ray進(jìn)行大模型的數(shù)據(jù)處理、訓(xùn)練、推理和部署
- Java性能權(quán)威指南(第2版)
- JavaScript動(dòng)態(tài)網(wǎng)頁(yè)開發(fā)詳解
- Reactive Android Programming
- Angular開發(fā)入門與實(shí)戰(zhàn)
- Creating Stunning Dashboards with QlikView
- Unity 2018 Shaders and Effects Cookbook
- 愛上micro:bit
- 智能搜索和推薦系統(tǒng):原理、算法與應(yīng)用
- 匯編語(yǔ)言編程基礎(chǔ):基于LoongArch