seanly

 

文章分类 -  c#

c#的四种排序
摘要:冒泡排序[代码]选择排序[代码]插入排序[代码]希尔排序 希尔排序是将组分段,进行插入排序.[代码] 阅读全文

posted @ 2009-12-21 15:12 seanly 阅读(122) 评论(0) 推荐(0)

ArrayList用法
摘要:System.Collections.ArrayList类是一个特殊的数组。通过添加和删除元素,就可以动态改变数组的长度。一.优点1。支持自动改变大小的功能2。可以灵活的插入元素3。可以灵活的删除元素二.局限性跟一般的数组比起来,速度上差些三.添加元素1.publicvirtualintAdd(objectvalue);将对象添加到ArrayList的结尾处ArrayListaList=newAr... 阅读全文

posted @ 2009-12-21 11:13 seanly 阅读(103) 评论(0) 推荐(0)

C# 得到GridView里面HyperLinkField列的Text值
摘要:(this.GridView.Rows[e.RowIndex].Cells[0].Controls[0]asHyperLink).Text 阅读全文

posted @ 2009-12-11 09:20 seanly 阅读(98) 评论(0) 推荐(0)

c#读取INI文件
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace 读写ini文件{ public class Ini { // 声明INI文件的写操作函数 WritePrivateProfileString() [System.Runtime.Int... 阅读全文

posted @ 2009-12-09 11:36 seanly 阅读(26076) 评论(0) 推荐(1)

c#常用函数
摘要:1、DateTime数字型System.DateTimecurrentTime=newSystem.DateTime();1.1取当前年月日时分秒currentTime=System.DateTime.Now;1.2取当前年int年=currentTime.Year;1.3取当前月int月=currentTime.Month;1.4取当前日int日=currentTime.Day;1.5取当前时i... 阅读全文

posted @ 2009-12-07 17:27 seanly 阅读(139) 评论(0) 推荐(0)

C#中常用的经典文件操作方法[转]
摘要:原文地址:http://www.cnblogs.com/SoulStore/archive/2007/06/19/788468.htmlC#追加文件 StreamWriter sw = File.AppendText(Server.MapPath(".")+"http://www.cnblogs.com/seanly/admin/file://mytext.txt/"); sw.WriteLine... 阅读全文

posted @ 2009-12-07 17:00 seanly 阅读(148) 评论(0) 推荐(0)

导航