官术网_书友最值得收藏!

Improvements to literals

This is another minor improvement to the C# language, but one that I'm sure will often be used by developers. One of my first jobs as a young man was working for a logistics company. These folks used to supply parts to Volkswagen, and the most critical parts were flown in by air freight from Germany or elsewhere. I will never forget the 9- and 12-digit shipping numbers the logistics people used to throw around in casual conversation. I wondered how they were able to remember literally hundreds of varying shipping numbers during the course of a year. After listening to them for a while, I noticed that they were saying these numbers with slight pauses after every third number. Even just looking at the  12-digit number 395024102833 is visually taxing. Imagine doing this several times a day, including memorizing the fast movers on the next shipment (I'm not even going to go into the printed shipment manifest, which was a nightmare). It is, therefore, easier to think of the number as 395-024-102-833 and this makes it easier to spot patterns. This is essentially exactly what C# 7.0 now allows developers to do with literals.

主站蜘蛛池模板: 称多县| 横山县| 绵阳市| 曲麻莱县| 射洪县| 友谊县| 建昌县| 贵定县| 白河县| 夏津县| 新竹县| 利川市| 昌吉市| 拉萨市| 衡山县| 丰原市| 内黄县| 临夏县| 星子县| 仪陇县| 旅游| 株洲县| 鹰潭市| 儋州市| 彭水| 金湖县| 泸州市| 千阳县| 乌审旗| 延寿县| 新兴县| 永川市| 东兰县| 环江| 宁国市| 穆棱市| 海门市| 靖边县| 阳江市| 临海市| 北流市|