C#
an410398183
sfd
展开
-
泛型类和方法
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 泛型类和方法{ class Program { static void Main(string[] args) { Tperson p1 = n转载 2009-09-23 11:06:00 · 226 阅读 · 0 评论 -
一个简单的钟表程序,请帮忙改改
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private PictureBox pictureBox1 = new PictureBox(); private Timer原创 2013-03-06 17:49:40 · 615 阅读 · 0 评论 -
单例模式
单例模式几个要点: 私有构造函数静态实例 适用场景:由于单例模式的以上优点,所以是编程中用的比较多的一种设计模式。我总结了一下我所知道的适合使用单例模式的场景: 需要频繁实例化然后销毁的对象。创建对象时耗时过多或者耗资源过多,但又经常用到的对象。有状态的工具类对象。频繁访问数据库或文件的对象。以及其他我没用过的所有要求只有一个对象的场景。 单例模式的几种声明方试: p原创 2013-04-11 13:45:31 · 446 阅读 · 0 评论 -
create for myself(4_23)
Regex.split(inputstring ,int cout) static void Main(string[] args) { string pattern = "(-)"; string input = "apple-apricot-plum-pear-banana"; Regex regex原创 2013-04-24 22:53:34 · 401 阅读 · 0 评论 -
Regex 小试
对于正则表达式的几具尝试 static void Main(string[] args) { string input = "This is,text with,far%too much whitespace."; string pattern = ","; string replacement = "&"原创 2013-04-27 16:42:00 · 370 阅读 · 0 评论