- 博客(10)
- 收藏
- 关注
原创 Stream to String
protected static System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(HotKeyMessage)); public string toXML() { System.IO.StringWriter sw = new System.I
2006-04-27 13:56:00 1209
转载 Detecting Designmode in ASP.Net
Detecting Designmode in ASP.NetUnlike WinForms, ASP.Net does not support a DesignMode property on the Page class, so theres no built in way to detect this. For building custom ASP.Net Server contro
2006-04-21 16:45:00 1448
原创 String.Format
搜到的一个方案,应该可以应用于建立适用于多种数据库的数据访问操作语句里面。对应于Oracle ,binding variable的写法是select * from usertbl where id=:id,而sql server是select * from usertbl where id=@id。private const string SQL_GET_RECORD = "SELECT
2006-04-12 22:22:00 981
转载 Transparent Database Access with ADO.NET
by Nick Harrison12/16/2002The DreamThe dream of transparent data access is to not have to care about where the data is coming from. You have more important things to worry about, like providing a
2006-04-12 22:17:00 1214
原创 request for the permission of type system.net.webpermission ....... is failed
运行一只调用web service 的程序,出现权限异常:request for the permission of type system.net.webpermission查找出来的结果,发现是UNC路径下运行程序的问题,把程序从网络文件夹上拷到本地硬盘上就没问题了
2006-04-12 16:36:00 3040
原创 Control.CheckForIllegalCrossThreadCalls
使用了FormDrag后,发现在SharpDevelop下会出现exception:"System.InvalidOperationException: Cross-thread operation not valid: Control [your_control_name_here] accessed from a thread other than the thread it was cr
2006-04-12 15:46:00 3655 1
转载 class for Dragging Form in .NET
internal class FormDrag { Form _form=null ; int _y = 0, _x = 0; private bool _mousedown = false; public FormDrag(Form form) { if (form == null) throw new Ar
2006-04-12 10:07:00 923
转载 Choosing What To Lock On
Choosing What To Lock OnI said earlier that Id explain why I created a new variable to lock on. Many books and articles recommend locking on this for instance methods and typeof(MyTypeName) (the Ty
2006-04-12 09:51:00 832
原创 DotNet Type to SqlDbType?
使用reflection机制操作类的持久化,在ADO.NET的IDataParameter设定Type时需要把dotnet的类型转化为dbtype,google了一下,似乎没什么偷懒的方法,得到的建议都是使用switch结构,麻烦。好在大部分成员变量都是string类型,直接建立parameter会对应到nvarchar,但是datetime类型会有些麻烦,因为dotnet的datetime类型值
2006-04-05 18:55:00 1256 1
原创 c盘下可以删除的windows文件
windows/drivercache/*.* 备份文件可以删除 82.7Mwindows/ime/imejp/*.*windows/ime/imej98/*.*windows/ime/imejp8-1/*.*windows/ime/imek6-1/*.* 日;韩输入法 共:73.4MSFC.exe/purgecache
2006-04-03 00:22:00 1872
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人