siso

明天会更好!

2014年4月26日 #

C#实现HttpPost提交文件

摘要: 先建立一个WebApplicationWeb.config --> Server.ashxusing System;using System.Data;using System.Web;using System.Collections;using ... 阅读全文

posted @ 2014-04-26 21:42 siso 阅读(2838) 评论(0) 推荐(0) 编辑

UDP 一个封锁操作被对 WSACancelBlockingCall 的调用中断

摘要: using System;using System.Collections.Generic;using System.Text;using System.Net.Sockets;using System.Net;using Common;using System.Threading;using Sy... 阅读全文

posted @ 2014-04-26 21:32 siso 阅读(1024) 评论(0) 推荐(0) 编辑

c# Invalidate() Update() Refresh()的区别

摘要: Control.Invalidate方法:使控件的特定区域无效并向控件发送绘制消息。通常情况下,用Invalidate()使区域无效就可触发该控件的重画了,但在一些条件下却没有触发重画.例如: private void button1_Click(object sender, EventArg... 阅读全文

posted @ 2014-04-26 21:29 siso 阅读(2420) 评论(0) 推荐(1) 编辑

Linq-分组统计

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{ public class Plan { publ... 阅读全文

posted @ 2014-04-26 21:22 siso 阅读(596) 评论(0) 推荐(0) 编辑

C# GetHashCode与Equals在HashTable表查找时的关系

摘要: using System;using System.Collections.Generic;using System.Text;using Microsoft.Win32;using System.Threading;using System.IO;using System.Security.Cry... 阅读全文

posted @ 2014-04-26 21:20 siso 阅读(344) 评论(0) 推荐(0) 编辑

获取基于Internet Explorer_Server的聊天窗口内容

摘要: 假设在得到窗体中控件的句柄(通过SPY++)的前提下,如果是像文本框这种控件,只要用SendMessage就可得到文本了,但是对于聊天记录窗口却行不通(返回空值),因为那其实是一个内置浏览器Internet Explorer_Server经查询,可用以下方式获取:先引用:mshtmlusing Sy... 阅读全文

posted @ 2014-04-26 21:15 siso 阅读(690) 评论(0) 推荐(0) 编辑

主机字节与网络字节的转换

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Net;namespace ConsoleApplication... 阅读全文

posted @ 2014-04-26 20:49 siso 阅读(268) 评论(0) 推荐(0) 编辑

SQL Server存储过程中防止线程重入处理方式

摘要: 对于线程重入,在C#中有lock关键字锁住一个SyncObject,而SQL Server也可用一个表来模拟实现。 先创建一个同步表,相当于C#中的SyncObject,并插入一条记录(初始值为1) create table SyncTable(id bit)goinsert into SyncTable (id) values (1)然后假设有个存储过程,有一系列操作,需要防止多线程同时访问到,... 阅读全文

posted @ 2014-04-26 20:33 siso 阅读(973) 评论(0) 推荐(0) 编辑

利用NVelocity 模版生成文本文件

摘要: namespace Common{ public class Tools { public string Process(string content, int startIndex, int length) { string resul... 阅读全文

posted @ 2014-04-26 15:15 siso 阅读(332) 评论(0) 推荐(0) 编辑

C# async await 学习笔记2

摘要: C# async await 学习笔记1(http://www.cnblogs.com/siso/p/3691059.html)提到了ThreadId是一样的,突然想到在WinForm中,非UI线程是无法直接更新UI线程上的控件的问题。于是做了如下测试:using System;using Syst... 阅读全文

posted @ 2014-04-26 14:44 siso 阅读(365) 评论(0) 推荐(0) 编辑

C# async await 学习笔记1

摘要: 由于我的开发工具为vs.net 2010(.net 4.0),需先做以下两步才能进行:1.下载并安装Async CTP (http://www.microsoft.com/en-us/download/details.aspx?id=9983)2.添加AsyncCtpLibrary.dll的引用,我... 阅读全文

posted @ 2014-04-26 11:58 siso 阅读(828) 评论(0) 推荐(0) 编辑

导航