- 博客(8)
- 收藏
- 关注
原创 单件
class Singleton { private static Singleton _instance; public static Singleton Instance() { if (_instance == null) { _instance = new Singleton(); } return _instance; }}
2005-04-29 16:45:00
990
原创 多态
using System;public class 动物 { public virtual void 叫() { Console.Write("我是一种动物"); } }public class 鸡 : 动物{ public override void 叫() { Cons
2005-03-05 21:18:00
864
原创 序列化
public class Serializable { public int n1 = 0; public int n2 = 0; public String str = null;}Serializable obj = new Serializable ();obj.n1 = 1;obj.n2 = 24;obj.str = "一些字符串";IFormatter formatter = ne
2005-02-05 11:33:00
715
原创 ASP.net中的几种分页方法
1、利用DataGrid内置的分页功能 在DataGrid控件的属性里加入以下语句 AllowPaging="True"PageSize="5"PagerStyle-HorizontalAlign="Right"注:AllowPaging是指允许分页。 PageSize是指定每页显示的记录数,如果不写,就会默认为10条。PagerStyle-HorizontalAlign是指定分页显示
2005-01-31 19:10:00
1686
原创 让你的程序像office一样有位小助手.
首先引用Microsoft Agent,然后在需要显示小精灵的地方Private void showAgent(string speak){ AgentObjects.IAgentCtlCharacterEx Myagent ; //申明AgentObjects的一个接口 AgentObjects.AgentClass myAgentclass= new AgentObjects.Age
2005-01-10 14:00:00
1298
原创 即时通讯服务端
这是一个简单的即时通讯服务端,关键的地方我已经标注,希望做即时通讯又无从下手的朋友可以做为学习材料! 祝好运!using System;using System.IO;using System.Net;using System.Text;using System.Net.Sockets;using System.Threading;namespace yjyserver{ /// /// 及时通
2005-01-08 23:45:00
3105
原创 c#打印条形码
我实现c#打印条形码,主要利用printDocument和条码字体实现,首先在网上下载条码字体,具体程序见片段。 private void button1_Click(object sender, System.EventArgs e) { p.Print(); } private void printDocument1_PrintPage(object sender, System.D
2005-01-08 13:43:00
7342
4
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人