随笔分类 -  C#

摘要:public class Proxy { public struct Struct_INTERNET_PROXY_INFO { public int dwAccessType; public IntPtr proxy; public IntPtr proxyBypass; }; [DllImport("wininet.dll", SetLastError = true)] private static extern bool InternetSetOpt... 阅读全文
posted @ 2012-06-07 12:58 第7笔画 阅读(392) 评论(0) 推荐(0)
摘要:项目的属性,生成,目标平台设为x86 阅读全文
posted @ 2012-06-04 09:33 第7笔画 阅读(141) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Data;public class SQLHelper{ /// <summary> /// 插入单个实例 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="entity"> 阅读全文
posted @ 2012-04-22 22:35 第7笔画 阅读(1142) 评论(0) 推荐(0)
摘要:using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Reflection;namespace System.Data{ public static class DataTableHelper { #region 利用反射把DataTable的数据写到单个实体类 public static T ToSingleEntity<T>(this System.Data.DataTable dtSource) { if (dt... 阅读全文
posted @ 2012-04-22 22:33 第7笔画 阅读(692) 评论(0) 推荐(0)
摘要:// 引入命名空间转载请注明 http://netsos.cnblogs.com/using System.Net;using System.Net.Mail;SmtpClient smtp = new SmtpClient(); //实例化一个SmtpClientsmtp.DeliveryMethod = SmtpDeliveryMethod.Network; //将smtp的出站方式设为 Networksmtp.EnableSsl = false;//smtp服务器是否启用SSL加密smtp.Host = "smtp.163.com"; //指定 smtp 服务器地址s 阅读全文
posted @ 2012-03-12 21:10 第7笔画 阅读(202) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Windows.Forms;using System.Runtime.InteropServices;namespace FWM{ static class Program { private static Form1 vf = null; private static System.Windows.Forms.Timer timer1 = null; /// <summary> /// 应用程序的主入口点。 /// </summary> ... 阅读全文
posted @ 2011-09-20 08:51 第7笔画 阅读(291) 评论(0) 推荐(0)