文章分类 -  C#

摘要:目的:为WEB程序做一套模板系统,每个模板是一个dll,在不影响主程序的情况下,动态加载模板。假设我们有一个类叫TUser,保存了用户的信息,很简单,只有username和email两个字段Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/*****************************************************************/user.cs**编译参数csc/t:library/out:bin/us 阅读全文
posted @ 2008-12-19 22:31 ifanxp 阅读(523) 评论(0) 推荐(0)
摘要:在与子线程进行沟通的时候,把自身对象传递过去是个好主意。 阅读全文
posted @ 2008-07-25 22:22 ifanxp 阅读(2367) 评论(0) 推荐(0)
摘要:using System; using System.Threading; namespace ifan { //自定义委托声明 public delegate void childExitDelegate(object sender, ChildExitEventArgs e); public class TDelegate { //自定义的事件,实际上就是上面那个委托类型的实例 public static event childExitDelegate onChildThreadExit; private static void Main() { //订阅事件,就是说,当onChildThreadExit事件发生时调用onChildExitFunction方法 onChildThreadExit += onChildExitFunction; //产生一个子线程,ParameterizedThreadStart可以带一个object参数,所以2.0之后我都用这个很方便 Thread t = 阅读全文
posted @ 2008-07-24 00:48 ifanxp 阅读(742) 评论(1) 推荐(1)