C#
文章平均质量分 66
liuxiuming
代码和音乐一样都是一种艺术
展开
-
B/S三层
业务层:处理表示层的需求,并将数据层的虚数据实体化. 数据层:提供给业务层的虚数据. 表示层:把用户的需求展示出来.转载 2009-03-03 21:20:00 · 602 阅读 · 0 评论 -
C# double 取 SQL Server 中的float 类型
<br />如果用C#中的float类型取会报错,用double型取就好了。原创 2011-01-14 15:43:00 · 1512 阅读 · 0 评论 -
C#反转字符串的两种方法
<br /><br />1<br /> public static string ReverseByArray(this string original)<br />{<br /> char[] c = original.ToCharArray();<br /> Array.Reverse(c);<br /> return new string(c);<br />}<br /> <br />2 <br />public static string ReverseByCharBuffer(t转载 2010-11-12 13:16:00 · 1453 阅读 · 0 评论 -
使用枚举的方法
protected Dictionary GetRemarkTypeList() { Dictionary dcRemarkType = new Dictionary(); dcRemarkType.Add("", "所有评论"); Dictionary dcEnumRemarkType原创 2010-05-06 16:57:00 · 660 阅读 · 0 评论 -
字符串反转的N种方法(转)
转自:http://www.cnblogs.com/kirinboy/archive/2010/04/23/reverse-a-string.html使用Array.Reverse方法对于字符串反转,我们可以使用.NET类库自带的Array.Reverse方法public static string ReverseByArray(this string original){转载 2010-04-23 14:16:00 · 1149 阅读 · 0 评论 -
aspx,ascx和ashx使用小结
aspx,ascx和ashx使用小结转自 :http://www.cnblogs.com/wjfluisfigo/archive/2009/07/07/1517628.html 做asp.net开发的对.aspx,.ascx和.ashx都不会陌生。关于它们,网上有很多文章介绍。“纸上得来终觉浅,绝知此事要躬行”,下面自己总结一下做个笔记。1、.aspxWeb窗体设计页面。Web窗体页由转载 2010-01-04 14:02:00 · 4231 阅读 · 1 评论 -
get/set方法的使用
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace test1{ class Program { static void Main(string[] args) {原创 2010-03-12 17:19:00 · 824 阅读 · 0 评论 -
更快的写XML的方法
我写的第一个程序中写XML的代码执行速度有些问题,改了一下,现在有所改善。 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Linq;using Syste原创 2010-02-21 15:15:00 · 657 阅读 · 0 评论 -
展示一下我做的第一个程序,哈哈
是一个windows服务程序,在特定的时间调用存储过程,并把查询结果输出到XML文件中。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Linq;using S原创 2010-01-27 17:26:00 · 1032 阅读 · 1 评论 -
用C#读SQL SERVER到控制台的简单示例
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;namespace ConsoleApplication4{ class Program { static v原创 2010-01-23 11:39:00 · 1815 阅读 · 1 评论 -
C#查询数据库把结果输出到XML的例子
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;namespace ConsoleApplication4{ class Program {原创 2010-01-23 15:26:00 · 3032 阅读 · 1 评论 -
C#修改XML的简单例子
接上一篇《C#写XML的简单例子》 这个例子要修改XML文件中结点的属性和和元素的文本 1 原xml文件 bookstore.xml who am i who 999 CS从入门到精通 候捷 222 2 program.cs using System;using System.Collections.Gene原创 2010-01-16 13:28:00 · 2111 阅读 · 0 评论 -
C#显示(读取)XML元素内容的简单例子
接上一篇显示所有结点的内容1 原xml文件 bookstore.xml who am i who 999 2 program.cs using System;using System.Xml;namespace ReadXml{ class Class1 { static void Main(str原创 2010-01-16 17:11:00 · 5780 阅读 · 0 评论 -
C#删除XML结点的简单例子
接上一篇删除原genre属性,删除leixing=love的所有结点。1 原xml文件 bookstore.xml who am i who 999 CS从入门到精通 黎明 222 2 program.cs using System;using System.Xml;namespace ReadXml{ c原创 2010-01-16 17:01:00 · 873 阅读 · 0 评论 -
C#写XML的简单例子
这个例子要把bookstore.xml文件增加一条book记录1 bookstore.xml who am i who 999 2 bookstore.cs using System;using System.Collections.Generic;using System.Linq;using System.Text;using Syst原创 2010-01-15 19:57:00 · 684 阅读 · 0 评论 -
分享一个格式化文件大小的 C# 方法(转)
格式化一个文件的大小,虽然很简单,但却是很常用的,这里分享一个C#写的格式化文件大小的方法: public static String FormatFileSize(Int64 fileSize){ if (fileSize < 0) { throw new ArgumentOutOfRangeException("fileSize");转载 2009-07-17 10:15:00 · 1486 阅读 · 0 评论 -
数据库中与C#中的数据类型对照
<br />/// <summary> /// 数据库中与C#中的数据类型对照 /// </summary> /// <param name="type"></param> /// <returns></returns> private string ChangeToCSharpType(string type) { string reval = string.Empty;转载 2011-03-17 14:43:00 · 764 阅读 · 0 评论