摘要:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Data;using System.Text;using System.Windows.Forms;using System.Diagnostics;using System.Runtime.InteropServices;using System.IO;using System.Drawing.Design;namespace HCDL{ public class Show... 阅读全文
摘要:
电子邮件协议? 当前常用的电子邮件协议有SMTP、POP3、IMAP4,它们都隶属于TCP/IP协议簇。SMTP Simple Mail Transfer Protocol(即简单邮件传输协议),它是一组用于从源地址到目的地址传送邮件的规则,简单的说就是:From-->To的传送规则。由SMTP来控制信件中转的方式。SMTP属于TCP/IP家族中的一员,它帮助每一台计算机在发送或中转信件时找到下一个目的地。通过SMTP协议所指定的服务器,就可以把E-Mail寄到收信人的服务器上。SMTP服务器则是遵循SMTP协议的邮件发送服务器,用来中转你发出的电子邮件。 SMTP目前已是事实上的E-M 阅读全文
摘要:
try{string url = "http://www.devbg.org/img/";string file = "Logo-BASD.jpg";string myStringWebResource = null;myStringWebResource = url + file;webClient.DownloadFile(myStringWebResource, file);//to view the image// System.Diagnostics.Process.Start("Logo-BASD.jpg");}catch 阅读全文
摘要:
在SQLite官方下载了System.Data.SQLite,编写如下测试代码:复制内容到剪贴板 程序代码using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=F:\my.db;Pooling=true;FailIfMissing=false")){using (SQLiteDataAdapter adapter = new SQLiteDataAdapter("select id,total from table1", conn)){DataTable table1 = ne 阅读全文
摘要:
2012-12-29 02:26 by 老赵, 1745 visits众所周知,.NET中Dictionary的键不能为null,否则会抛出NullReferenceException,这在某些时候会显的很麻烦。与此相对的是Java中的HashMap支持以null为键,则方便许多。尽管null的确不是个好东西,但它既然已经存在,既然给我们造成了麻烦,我们就要想办法去解决它。实现一个自己的字典类自然可行,但要精心实现一个高效的字典并不是件容易的事情,例如BCL中的Dictionary.cs就有超过2000行代码。此外另一个容易想到的方法便是实现IDictionary接口,将大部分实现委托给现成. 阅读全文