1. 一些常用格式,参考链接:http://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx

  1. int value = -;
  2. Console.WriteLine(value.ToString("D8"));
  3.  
  4. double doubleNumber = 12345.678;
  5. Console.WriteLine(doubleNumber.ToString("E",CultureInfo.InvariantCulture)); //1.234568E+004
  6.  
  7. int integerNumber = ;
  8. Console.WriteLine(integerNumber.ToString("F")); //1234567.00
  9.  
  10. int zeroSpecifierInteger = ;
  11. Console.WriteLine(zeroSpecifierInteger.ToString("")); //
  12.  
  13. double zeroSpecifierDouble = 12.345;
  14. Console.WriteLine(zeroSpecifierDouble.ToString("00.00")); //12.35
  15. Console.WriteLine(zeroSpecifierDouble.ToString("000.00")); //012.35
  16.  
  17. double zeroSpecifierWithComma = 1234567890.890;
  18. Console.WriteLine(zeroSpecifierWithComma.ToString("0,0.00",CultureInfo.InvariantCulture)); //1,234,567,890.89
  19.  
  20. Console.Read();

2.

Format - Numeric的更多相关文章

  1. java读取大容量excel之二(空格、空值问题)

    最近在项目中发现,对于Excel2007(底层根本是xml) ,使用<java读取大容量excel之一>中的方式读取,若待读取的excel2007文件中某一列是空值,(注意,所谓的空值是什 ...

  2. poi大数据将excel2007导入数据库

    package com.jeeframe.cms.updata.service.impl; import java.io.IOException; import java.io.InputStream ...

  3. man vxfenadm

    man vxfenadmReformatting page. Please Wait... done VCS 6.0.1 VXFENADM(1M) NAME vxfenadm - Manage SCS ...

  4. java excel大数据量导入导出与优化

    package com.hundsun.ta.utils; import java.io.File; import java.io.FileOutputStream; import java.io.I ...

  5. Linux随笔-鸟哥Linux基础篇学习总结(全)

    Linux随笔-鸟哥Linux基础篇学习总结(全) 修改Linux系统语系:LANG-en_US,如果我们想让系统默认的语系变成英文的话我们可以修改系统配置文件:/etc/sysconfig/i18n ...

  6. 从ORM框架到SQLAlchemy

    一.ORM 1.什么是ORM 对象-关系映射(Object-Relational Mapping,简称ORM),面向对象的开发方法是当今企业级应用开发环境中的主流开发方法,关系数据库是企业级应用环境中 ...

  7. 函数索引引用的函数必须是immutable类型

    用户在使用中,可能会用到基于函数的索引,但是函数是非 immutable 类型的,导致函数索引无法创建.如: test=# create index ind_t1 on t1(to_char(crea ...

  8. Standard Numeric Format Strings

    The following table describes the standard numeric format specifiers and displays sample output prod ...

  9. 字符串格式化格式 -- Numeric Format Strings

随机推荐

  1. Nginx+certbot 实现泛域名的https证书

    yum -y install git git clone  https://github.com/certbot/certbot cd certbot ./certbot-auto certonly ...

  2. CodeForces - 779D String Game(二分)

    Little Nastya has a hobby, she likes to remove some letters from word, to obtain another word. But i ...

  3. 洛谷 P2056 [ZJOI2007]捉迷藏 题解【点分治】【堆】【图论】

    动态点分治入 门 题? 题目描述 Jiajia和Wind是一对恩爱的夫妻,并且他们有很多孩子.某天,Jiajia.Wind和孩子们决定在家里玩捉迷藏游戏.他们的家很大且构造很奇特,由 \(N\) 个屋 ...

  4. ZOJ Monthly, January 2019 Little Sub and his Geometry Problem ZOJ4082(模拟 乱搞)

    在一次被自己秀死... 飞机 题目: 给出N,K, Q; 给出一个N*N的矩阵  , 与K个特殊点 , 与Q次查询 , 每次查询给出一个C , 问 在这个N*N矩阵中 , 有多少的点是满足这样的一个关 ...

  5. 建立ionic3的环境

    看了好些例子,关于如何搭建ionic3的环境的,结果因为代理服务器的原因,弄好久才成功.前面的步骤网上随意可以找到的了,关键是ionic设置代理的地方,如果你的公司也需要代理才能到外网的话.... 1 ...

  6. js插件编程-tab框

    JS代码 (function (w) { //tab对象 function Tab(config) { //定义变量,防止变量污染 this.tabMenus=null; this.tabMains= ...

  7. 获得Windows系统的远程桌面连接历史记录

    转载:http://www.mottoin.com/tech/109219.html 渗透技巧—获得Windows系统的远程桌面连接历史记录 0x00 前言 在渗透测试中,远程桌面连接的历史记录不可忽 ...

  8. ZABBIX 监控基本报警故障

    CPU触发器: 1)Processor load is too high on {HOST.NAME} {HOST.NAME}上处理器负载太高 触发器表达式:{Zabbix server:system ...

  9. (转)Shell全局变量、局部变量与特殊变量笔记总结

    Shell全局变量.局部变量与特殊变量笔记总结 原文:http://blog.csdn.net/apollon_krj/article/details/70148022 变量类型:全局变量(环境变量) ...

  10. vue中watch的使用

    vue中watch的使用 vue中的watch是一个比较重要的概念,通过他我们可以检测data的变化,下面进行详细的介绍. watch定义方式如下: {[key: string]: string | ...