Format - Numeric
1. 一些常用格式,参考链接:http://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx
int value = -;
Console.WriteLine(value.ToString("D8")); double doubleNumber = 12345.678;
Console.WriteLine(doubleNumber.ToString("E",CultureInfo.InvariantCulture)); //1.234568E+004 int integerNumber = ;
Console.WriteLine(integerNumber.ToString("F")); //1234567.00 int zeroSpecifierInteger = ;
Console.WriteLine(zeroSpecifierInteger.ToString("")); // double zeroSpecifierDouble = 12.345;
Console.WriteLine(zeroSpecifierDouble.ToString("00.00")); //12.35
Console.WriteLine(zeroSpecifierDouble.ToString("000.00")); //012.35 double zeroSpecifierWithComma = 1234567890.890;
Console.WriteLine(zeroSpecifierWithComma.ToString("0,0.00",CultureInfo.InvariantCulture)); //1,234,567,890.89 Console.Read();
2.
Format - Numeric的更多相关文章
- java读取大容量excel之二(空格、空值问题)
最近在项目中发现,对于Excel2007(底层根本是xml) ,使用<java读取大容量excel之一>中的方式读取,若待读取的excel2007文件中某一列是空值,(注意,所谓的空值是什 ...
- poi大数据将excel2007导入数据库
package com.jeeframe.cms.updata.service.impl; import java.io.IOException; import java.io.InputStream ...
- man vxfenadm
man vxfenadmReformatting page. Please Wait... done VCS 6.0.1 VXFENADM(1M) NAME vxfenadm - Manage SCS ...
- java excel大数据量导入导出与优化
package com.hundsun.ta.utils; import java.io.File; import java.io.FileOutputStream; import java.io.I ...
- Linux随笔-鸟哥Linux基础篇学习总结(全)
Linux随笔-鸟哥Linux基础篇学习总结(全) 修改Linux系统语系:LANG-en_US,如果我们想让系统默认的语系变成英文的话我们可以修改系统配置文件:/etc/sysconfig/i18n ...
- 从ORM框架到SQLAlchemy
一.ORM 1.什么是ORM 对象-关系映射(Object-Relational Mapping,简称ORM),面向对象的开发方法是当今企业级应用开发环境中的主流开发方法,关系数据库是企业级应用环境中 ...
- 函数索引引用的函数必须是immutable类型
用户在使用中,可能会用到基于函数的索引,但是函数是非 immutable 类型的,导致函数索引无法创建.如: test=# create index ind_t1 on t1(to_char(crea ...
- Standard Numeric Format Strings
The following table describes the standard numeric format specifiers and displays sample output prod ...
- 字符串格式化格式 -- Numeric Format Strings
随机推荐
- SpringBoot application.properties 配置项详解
参考: http://blog.csdn.net/lpfsuperman/article/details/78287265### # spring boot application.propertie ...
- LeetCode记录之28——Implement strStr()
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle ...
- 关于去掉输入一定数字n,在n后写入n个字符串的问题
在输入数字n后要用一个getchar 去吃掉数字n后面跟着的回车符号,从而保证输入的字符串数是和n是保持一致的 具体实例代码如下: #include<stdio.h> #include&l ...
- 江西理工大学南昌校区排名赛 E: 单身狗的种树游戏
题目描述 萌樱花是一只单身狗. 萌樱花今天决定种树,于是他来到了自己家的后院. 萌樱花的后院有n个树坑,所有树坑排列在一行上,每一个树坑都可以种一棵树,相邻树坑间的距离为1,现在所有的树坑都是空着的. ...
- Codeforces - 912B 位运算
求[1,n]内k的值的异或和使其值最大 k=1是肯定是n k>1,设pos是n的最高位,那答案就是(1ll<<(pos+1))-1 这里用到一个性质是当S=2^i-1时,a xor ...
- 关于es6 import export的学习随笔
记得之前的一次面试中,有个面试官问了我关于es6导入和导出的一些知识点,可惜当时对这方面没在意,只知道每次机械的import和export,也不知道为啥要这样用,现在静下心来,好好的把这块看了下,顺便 ...
- 【总结】sqlmap-tamper编写小结
目的:修改sqlmap中的tamper脚本来绕过代码对特定参数的过滤和转义 环境:win10.phpstudy2016.sqli-labs-master平台 工具:sqlmap.burpsuite 地 ...
- git撤销commit,但未git push的命令
在git push的时候,有时候我们会想办法撤销git commit的内容 1.找到之前提交的git commit的id git log 找到想要撤销的id 2.git reset –hard id ...
- 6.ConcurrentHashMap jdk1.7
6.1 hash算法 就是把任意长度的输入,通过散列算法,变换成固定长度的输出,该输出就是散列值.这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,所 ...
- jdk监控tomcat
一, tomcat配置文件 在tomcat的配置文件中添加被监控的项 #在tomcat配置文件中开启监控功能 vim /application/tomcat/bin/catalina.sh +97 C ...