上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: 阅读全文
posted @ 2013-04-26 15:07 pnljs 阅读(135) 评论(0) 推荐(0) 编辑
摘要: MemberwiseClone复制出来的字段也好,属性也好(不包括Address之类的类型),修改其中副本一个这些值,都不会影响到原值。但自定义的类,就不行了,只能通过深拷贝来实现不互相影响。 阅读全文
posted @ 2013-04-25 18:17 pnljs 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 源码下载遇到的问题:在WCF服务层的Iservice,我写了这样的一个方法:[OperationContract]List<string> GetStudentNameList();在客户端调用的时候发现调用GetStudentNameList()返回的却是 string[]解决如图: 阅读全文
posted @ 2013-04-24 22:45 pnljs 阅读(174) 评论(0) 推荐(0) 编辑
摘要: C#代码View Code 1staticvoidGetConfigInfo()2{3//访问Test14//IDictionaryidTest1=(IDictionary)ConfigurationSettings.GetConfig("Test1");5IDictionaryidTest1=(IDictionary)System.Configuration.ConfigurationManager.GetSection("Test1");6stringstr=(string)idTest1["setting1"]+"__ 阅读全文
posted @ 2013-04-24 12:02 pnljs 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 自己加了一个自定义的节点,加在<configSections></configSections>之间,查了资料才发现:如果配置文件中包含configSections元素,则configSections元素必须是configuration元素的第一个子元素。所以就把<configSections></configSections>放在最前面就不会报错了。 阅读全文
posted @ 2013-04-24 11:33 pnljs 阅读(3185) 评论(0) 推荐(0) 编辑
摘要: string foodType = ConfigurationSettings.AppSettings["No1"];instance = (Builder)Assembly.Load("创建者模式").CreateInstance("创建者模式." + foodType);培植文件如下:<?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings> <add key=" 阅读全文
posted @ 2013-04-24 10:17 pnljs 阅读(227) 评论(0) 推荐(0) 编辑
摘要: LogHelper.rar下载最近在做系统的优化,但优化之前先得知道哪些地方有问题,耗费时间比较长,我们系统用服务层用的是WCF,现在对系统的某一个操作记录时间(包括客户端与服务器端,是在本机测试的),想法是写一个公共项目,客户端与服务器端都去引用它,然后记录时间(因为是在本机测试,所以客户端与服务器端时间是一致的),我想让客户端与服务器端所记录的时间都记录到一个文件中,这样我运行起来完之后,日志也生成完了。想法是这样的,代码如下:View Code 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSy 阅读全文
posted @ 2013-04-23 15:55 pnljs 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 源码下载我们在主窗口中要执行5个操作,而且每个操作都需要花上10秒钟,若是不做任何处理,则当我们处理这5个任务的时候,你点了界面,界面产马就会龙掉,直到完成。现在我们为了提高用户体验,在做5个任务的时候,弹出一个Dialog框告诉用户现在在做什么任务,这样用户体验就好了许多。如下图所示:若是有写的不当之处或问题,提出来,我们互相学习。 阅读全文
posted @ 2013-04-22 12:49 pnljs 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Text; 5: using System.Threading; 6: 7: namespace CatVSMice_ForManyWar... 阅读全文
posted @ 2013-04-16 14:26 pnljs 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 1: using System; 2: using System.Collections.Generic; 3: using System.Linq; 4: using System.Text; 5: using System.Threading; 6: 7: namespace CatVSMice 8: { ... 阅读全文
posted @ 2013-04-16 12:45 pnljs 阅读(300) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页