freeCodeCamp/guide/chinese/csharp/literal-improvements/index.md

18 lines
501 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Literal Improvements
localeTitle: 文字改进
---
# 文字改进
C7.0允许\_作为**_数字_**文字中的**_数字分隔符_**出现:
```
var d = 123_456;
var x = 0xAB_CD_EF;
```
您可以将它们放在数字之间的任何位置,以提高可读性。它们对价值没有影响。
此外C7.0引入了**_二进制文字_** ,因此您可以直接指定位模式,而不必心脏地知道十六进制表示法。
```
var b = 0b1010_1011_1100_1101_1110_1111;
```