Shawn

智慧本身就是好的。有一天我们都会死去,追求智慧的道路还会有人在走着。死掉以后的事我看不到,但在我活着的时候,想到这件事,心里就很高兴。 —— 王小波

导航

2013年8月30日 #

C#中的委托范例学习

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { public delegate void GreetingDelegate(string name); private static void GreetingPeople(string name, GreetingDelegate makingGreeting) { ... 阅读全文

posted @ 2013-08-30 16:36 ShawnZhou 阅读(163) 评论(0) 推荐(0) 编辑

2013年8月26日 #

C#调用cmd程序,读取结果

摘要: 示例,调用cmd执行PING命令,读取结果,代码如下: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;namespace AppUserDocsExecute{ class Program { st... 阅读全文

posted @ 2013-08-26 11:36 ShawnZhou 阅读(468) 评论(0) 推荐(0) 编辑

2013年8月21日 #

C# 读取txt文本内容写入到excel

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using Microsoft.Office.Interop.Excel;using System.Reflection;namespace ReadTextToExcel{ public partial cl... 阅读全文

posted @ 2013-08-21 10:10 ShawnZhou 阅读(2616) 评论(0) 推荐(0) 编辑

2013年5月20日 #

C# Linq读取XML文件

摘要: 1、示例XML文件:Demo.xml<?xml version="1.0" encoding="utf-8" ?><note> <conf> <to>infozero</to> <from>lerroy</from> <heading>测试信息</heading> <body>第一条测试信息</body> <title name="我的第一条消息">from myself</title& 阅读全文

posted @ 2013-05-20 23:08 ShawnZhou 阅读(279) 评论(0) 推荐(0) 编辑

C# 密码框按回车,同时登录按钮回车

摘要: private void txbPassword_KeyPress(object sender, KeyPressEventArgs e) { //输入密码后按回车键直接登录 if (e.KeyChar == 13) { this.btn_Login.Focus(); this.btn_Login.PerformClick(); } } 阅读全文

posted @ 2013-05-20 23:00 ShawnZhou 阅读(274) 评论(0) 推荐(0) 编辑