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

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.

主站蜘蛛池模板: 炉霍县| 航空| 洞头县| 洞头县| 佛学| 郯城县| 新巴尔虎右旗| 云和县| 大兴区| 钟山县| 行唐县| 荣昌县| 东光县| 博爱县| 轮台县| 高要市| 大宁县| 夏津县| 武川县| 宜州市| 宜宾市| 榆树市| 达日县| 侯马市| 宁晋县| 普陀区| 平潭县| 泌阳县| 宁远县| 罗定市| 永胜县| 卓尼县| 永宁县| 囊谦县| 榕江县| 夏邑县| 南靖县| 乌拉特后旗| 宜兴市| 治多县| 兖州市|