随笔分类 -  C#

摘要:常用Visual C# 快捷键大放送1. F12:转到定义;Shift+F12:转到引用 2. F5:启动;Ctrl+F5:开始执行(不调试);Shift+F5:停止调试 3. F7:查看代码;Shift+F7:查看视图设计器 4. Ctrl+Alt+L:解决方案资源管理器 5. Ctrl+Alt+J:对象浏览器 6. F4:显示属性窗口 7. Ctrl+Alt+X:工具箱 8. Ctrl+Alt... 阅读全文

posted @ 2010-04-07 09:58 Leon0812 阅读(243) 评论(0) 推荐(0) |

摘要:代码 阅读全文

posted @ 2010-03-02 13:30 Leon0812 阅读(195) 评论(0) 推荐(0) |

摘要:using System;using System.Runtime.InteropServices;/// <summary>/// C#调用非托管的DLL/// <description>/// 非托管的就特殊处理(实际上你拷贝到bin是没有任何作用的,因为CLR会把文件拷贝到一个临时目录下,然后在那运行Web,而CLR只会拷贝托管文件,这就是为什么把非托管的DLL放到b... 阅读全文

posted @ 2010-02-23 11:16 Leon0812 阅读(384) 评论(0) 推荐(0) |

摘要:[代码] 阅读全文

posted @ 2009-04-08 08:42 Leon0812 阅读(183) 评论(0) 推荐(0) |

摘要:[代码] 阅读全文

posted @ 2009-03-12 16:28 Leon0812 阅读(270) 评论(0) 推荐(0) |

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.Collections.Generic; using System.Text; using System.Xml; using Syst... 阅读全文

posted @ 2009-03-12 16:21 Leon0812 阅读(317) 评论(0) 推荐(0) |

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.IO; using System.Text; using System.Data; namespace DbConvert { /*... 阅读全文

posted @ 2009-03-12 16:12 Leon0812 阅读(259) 评论(0) 推荐(0) |

摘要:獲取URL: 重點: HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.ApplicationPath Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-... 阅读全文

posted @ 2009-03-02 11:27 Leon0812 阅读(203) 评论(0) 推荐(0) |

摘要:1. 相同及联系 A. 两者都是抽象类,都不能实例化。 B. interface实现类及abstrct class的子类都必须要实现已经声明的抽象方法。 2. 不同 A. interface需要实现,要用implements,而abstract class需要继承,要用extends。 B. 一个类可以实现多个interface,但一个类只能继承一个abstract class。... 阅读全文

posted @ 2009-02-06 10:22 Leon0812 阅读(257) 评论(0) 推荐(0) |

摘要:以下是一个查询IP地址归属地的CLR存储过程,三步: 1、用C#来做DLL,代码如下: //==================================================================== using System; using System.Collections.Generic; using System.Text; using System.Data... 阅读全文

posted @ 2008-12-16 14:41 Leon0812 阅读(251) 评论(0) 推荐(0) |

摘要:1.using System.Runtime.InteropServices; 2.import kernel32.dll [DllImport("kernel32.dll",EntryPoint = "LCMapStringA")] public static extern int LCMapString(int Locale,int dwMapFlags,by... 阅读全文

posted @ 2008-12-12 17:54 Leon0812 阅读(327) 评论(0) 推荐(0) |

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.Data; using System.Configuration; using System.Web; using System.Web.S... 阅读全文

posted @ 2008-08-15 10:58 Leon0812 阅读(391) 评论(1) 推荐(0) |

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> /// /// 发送邮件类 的摘要说明 /// public class MailSender { #region 数据成员 ... 阅读全文

posted @ 2008-08-14 16:52 Leon0812 阅读(236) 评论(0) 推荐(0) |

摘要:1using System; 2using System.Collections.Generic; 3using System.Text; 4 5namespace ClassLibrary1 6{ 7 8 //抽象類 9 public abstract class Tank 10 { 11 //構造函數 12 ... 阅读全文

posted @ 2008-05-09 18:02 Leon0812 阅读(180) 评论(0) 推荐(0) |

摘要:看了微軟webcast講師李建忠的blog,看到關于程序員的幾個階段,很有感觸,特摘抄下來,以飨大家,共勉之: 1. 基本运用C#语法,在各种工具和示例代码的支持下,完成一些基本程序任务 2. 熟练掌握面向对象与组件构造,知其然亦知其所以然,完成一般小规模信息管理类软件项目开发任务 3. 深入理解CLR内核机制,对各种类型与.NET平台机制的优缺点、适用场合、效率有清晰把握,能够完成技术复杂度比... 阅读全文

posted @ 2008-05-09 14:40 Leon0812 阅读(161) 评论(0) 推荐(0) |

摘要:1using System; 2using System.Collections.Generic; 3using System.Text; 4using System.IO; 5 6 /**//// 7 /// CG2BFilter 執行簡體和繁體中文之間的轉換工作,頁頁調用時只雖在頁面加入如下代碼即可 8 /// Response.Filter... 阅读全文

posted @ 2008-04-23 09:25 Leon0812 阅读(258) 评论(0) 推荐(0) |

摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 int 日... 阅读全文

posted @ 2008-01-23 14:25 Leon0812 阅读(326) 评论(0) 推荐(0) |

摘要:ReportDocument rptDocument; rptDocument.SetDataSource(dataSet); CrystalDecisions.Shared.ReportPageRequestContext rprc = new CrystalDecisions.Shared.ReportPageRequestContext(); ... 阅读全文

posted @ 2007-12-25 21:17 Leon0812 阅读(934) 评论(0) 推荐(0) |

摘要:1 //数字转换称大写#region//数字转换称大写 2 public static string GetThousandNumberName(string p_strThousandNumberName) 3 { 4 string v_strThousand = p_strThousandNumberName; 5 stri... 阅读全文

posted @ 2007-11-06 09:19 Leon0812 阅读(1702) 评论(1) 推荐(0) |

摘要:会计格式: 1234567.00.ToString("$#,##0.00") 取字符固定长度 private string getLeftSubString(string content, int length) { Encoding encoding = Encoding.GetEncoding("gb2312"); StringBuilder... 阅读全文

posted @ 2007-11-06 09:15 Leon0812 阅读(195) 评论(0) 推荐(0) |

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3