
C#
阿非
这个作者很懒,什么都没留下…
展开
-
WindowsService视频
WindowsServiceDemo视频我个人录制的关于 WindowsService 的视频.包括如何创建 WindowsService ,部署 WindowsService ,以及调试 WindowsService文件是 exe 文件,可直接运行观看WindowsServiceDemo视频http://download.youkuaiyun.com/source原创 2009-08-31 14:37:00 · 2701 阅读 · 2 评论 -
IHttpAsyncHandler 的一个应用
public class IHttpAsyncHandlerDEMO : IHttpHandler, IHttpAsyncHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plai原创 2012-05-31 12:44:08 · 1424 阅读 · 0 评论 -
一个关于WaitCallback和ThreadPool.QueueUserWorkItem的小例子
class CustomThreadPool { //仅仅只是计数 public static int count; public static Thread QueueUserWorkItem(Action action) { ret原创 2011-12-31 02:32:44 · 7423 阅读 · 0 评论 -
一个C#中浅复制(shallow copy)/深复制(deep copy)的例子
[Serializable] public class User : ICloneable { public string name; public string desc; public string remark; public User()原创 2011-12-30 20:05:36 · 3792 阅读 · 2 评论 -
HTTP长连接的例子
<asp:Button ID="btn" runat="server" Text="提交" OnClientClick="document.getElementById('ifr').src='Handler.ashx';return false;" /> var callBack = function (val) { doc原创 2012-01-31 23:14:24 · 2332 阅读 · 2 评论 -
用Sqlserver中的text类型存储图片
create table testTB( ID int, [file] text) Upload.aspx <asp:HyperLinkField HeaderText="连接地址"原创 2011-12-21 17:54:53 · 4450 阅读 · 0 评论 -
为Request.Form追加元素
ResultHandler /// /// Summary description for ResultHandler /// public class ResultHandler :System.Web.UI.Page, IHttpHandler { bool IHttpHandler.IsReusable原创 2011-12-03 14:56:09 · 2903 阅读 · 0 评论 -
WinForm中异步刷新窗体
原帖地址:http://topic.youkuaiyun.com/u/20111108/09/07216bf6-d888-43c5-9192-87ffa4b4892c.htmlpublic class Flag { public static bool IsOpen { set; get; } public static object lockObj =原创 2011-11-08 17:00:48 · 11998 阅读 · 9 评论 -
C#通过POP3协议验证 Email 账号
static bool ValidateEmailAccount(string server, int port, string userName, string password, out string ErrorMessage) { ErrorMessage = ""; //create a tcp connection原创 2011-11-28 19:53:46 · 2173 阅读 · 3 评论 -
ajax方式填充GridView
功能很简单,页面异步发送请求,服务器端响应的内容是XML,页面根据返回的XML填充已存在的GridView新增页面用于展示数据 var xmlHttp = null; var isIE = !!window.ActiveXObject; function createXMLHttpRequest()原创 2011-11-01 18:49:17 · 4201 阅读 · 4 评论 -
Implements IConfigurationSectionHandler interface,create a custom configuration section handler
原帖地址:应用程序配置文件问题配置文件如下: 文中网友使用 NameValueSectionHandler 来处理 configuration section,他的问题是为什么 OHeadLabel 只取到一个,而不是多个。这里要说明一下, NameValueSectio原创 2011-10-31 23:51:50 · 2084 阅读 · 0 评论 -
++运算符在C/C++与C#/JAVA中的差异
++ 运算符The increment operator (++) increments its operand by 1. The increment operator can appear before or after its operand 增量运算符 (++) 将操作数加 1。增量运算符可以出现在操作数之前或之后The first form is a prefix increme原创 2011-06-06 14:10:00 · 1604 阅读 · 0 评论 -
动态构建OrderBy的Lambda表达式
<br />public class Employee { public int ID { get; set; } public string Name { get; set; } public decimal Pay { get; set; } public float Height { get; set; } }<br /> <br />class Program { static原创 2010-07-14 19:26:00 · 12275 阅读 · 0 评论 -
求字符串中出现最多的字符和出现的次数
原帖在: http://topic.youkuaiyun.com/u/20100426/02/7c903e18-5dd1-4f2c-8918-add42fbe7152.html 里面的实现是C#版的 ,下面贴一个 VB版的 Imports SystemImports System.Collections.GenericModule Module1 Const P原创 2010-04-27 17:01:00 · 4101 阅读 · 1 评论 -
C# 实现DataTable的行转列
原创 2010-03-01 18:01:00 · 8585 阅读 · 4 评论 -
IHttpAsyncHandler 的一个DEMO
public class IHttpAsyncHandlerDEMO : IHttpHandler, IHttpAsyncHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plai原创 2012-05-31 12:45:31 · 2422 阅读 · 0 评论