摘要: 实例代码,post发送类,编写如下:class PostSubmitter {public enum PostTypeEnum { Get, Post }private string m_url = string.Empty; private NameValueCollection m_values = new NameValueCollection(); private PostTypeEnum m_type = PostTypeEnum.Get;public PostSubmitter() { }public PostSubmitter(string url): this... 阅读全文
posted @ 2013-10-09 16:02 bk.lling 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 实例代码如下XmlDocument xmlDoc = new XmlDocument(); xmlDoc = new XmlDocument(); XmlDeclaration dec; XmlElement elem; XmlAttribute att; dec = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", null); xmlDoc.AppendChild(dec);elem = xmlDoc.CreateElement("test_data"); att = xmlDoc.Creat 阅读全文
posted @ 2013-10-09 15:37 bk.lling 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 1、格式化货币(跟系统的环境有关,中文系统默认格式化人民币,英文系统格式化美元)string.Format("{0:C}",0.2) 结果为:¥0.20 (英文操作系统结果:$0.20)默认格式化小数点后面保留两位小数,如果需要保留一位或者更多,可以指定位数 string.Format("{0:C1}",23.15) 结果为:¥23.2 (截取会自动四舍五入)格式化多个Object实例 string.Format("市场价:{0:C},优惠价{1:C}",23.15,19.82)2、格式化十进制的数字(格式化成固定的位数,位数不能少于 阅读全文
posted @ 2013-10-09 15:16 bk.lling 阅读(436) 评论(0) 推荐(0) 编辑