博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  .Net 1.0

摘要:C#获取项目程序路径的方法 1.asp.net webform用“Request.PhysicalApplicationPath获取站点所在虚拟目录的物理路径,最后包含“\”; 2.c# winform用A:“Application.StartupPath”:获取当前应用程序所在目录的路径,最后不包含“\”;B:“Application.Executa... 阅读全文

posted @ 2008-05-13 11:28 Snapping 阅读(7533) 评论(0) 推荐(0)

摘要:telnet ssoverseadbdev 1433 阅读全文

posted @ 2007-04-11 14:58 Snapping 阅读(271) 评论(0) 推荐(0)

摘要:XmlSerializer xmlSerialilzer = new XmlSerializer(typeof(SOV10)); using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(soXml))) { SOV10 so = (SOV... 阅读全文

posted @ 2007-04-02 15:17 Snapping 阅读(172) 评论(0) 推荐(0)

摘要:摘录自http://www.developer.com/net/cplus/article.php/1479761: The following list outlines some of the major differences between .NET Remoting and Web services that will help you to decide when to use one... 阅读全文

posted @ 2007-03-27 12:05 Snapping 阅读(213) 评论(0) 推荐(0)

摘要:[DllImport("user32.dll")] private static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam); private int GetLineCount(TextBox txt) { return SendMessage(txt.Handle, 0xBA, 0, ... 阅读全文

posted @ 2007-03-26 14:48 Snapping 阅读(244) 评论(0) 推荐(0)

摘要:为类实现复制方法。下面方法只是对成员变量,属性实现复制。有空还需要将方法等补上。 private static void CopyObject(object src, object des) { System.Type objType = src.GetType(); foreach (PropertyInfo pi in objType.GetPropertie... 阅读全文

posted @ 2007-03-23 09:27 Snapping 阅读(206) 评论(0) 推荐(0)

摘要:并非所有的非贪婪匹配都存在效率问题!! 以下文章有详细介绍,原文地址 http://blog.csdn.net/dbigbear/archive/2006/12/25/1461099.aspx 2. 非贪婪匹配的效率 可能有不少的人和我一样,有过这样的经历:当我们要匹配类似 "内容" 或者 "[b]加粗[/b]" 这样的文本时,我们根据正向预搜索功能写出这样的表达式:"([^))*"... 阅读全文

posted @ 2007-03-23 08:56 Snapping 阅读(216) 评论(0) 推荐(0)