
.net
宝贝一路向前
这个作者很懒,什么都没留下…
展开
-
C#根据类名字符转实例调用整理
转 Activator.CreateInstance(ClassName) 就解决了。至于调用,建议用接口做约束,反射调用性能很低 /// /// 调用远程方法 /// /// 程序集名称 /原创 2011-07-26 08:42:35 · 1930 阅读 · 0 评论 -
序列化类型为“System.Reflection.RuntimeModule”的对象时检测到循环引用
在 .Net MVC中原来 直接在public JsonResult Test(){ return Json(GetDataTable());}//容易出现序列化类型为“System.Reflection.RuntimeModule”的对象时检测到循环引用可以考虑在ajax中增加 dataType:'json'.及在后台原创 2017-07-11 15:29:40 · 13599 阅读 · 1 评论 -
微信公众号开发笔记
在调用微信接口post数据是string类型,string不能有空格{ "type":"image", "offset",0 "count":20}正确格式{"type":"image","offset",0 "count":20}1、新增永久素材增加素材可以使用 curl 命令 或接口先上传图片、视频、音频先下载 curl_7_53_1原创 2017-05-01 23:28:20 · 1349 阅读 · 0 评论 -
Ueditor 使用
MVC使用Ueditor首先进行配置,前台配置ue = UE.getEditor('container', { toolbars: [ [ 'source', 'bold', 'italic',原创 2017-04-18 08:54:56 · 1691 阅读 · 0 评论 -
HttpWebRequest乱码
记得有一个项目获取json数据。使用浏览器获取是乱码,采用 UTF-8 编辑则正常,则使用HttpWebRequest进行请求,采用了以下二种方式都无法进行正常编码 string sRet = ""; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url)原创 2016-12-28 10:08:04 · 7592 阅读 · 2 评论 -
WPF 笔记
自定控件 在项目中增加 UserControl 控件, 可以使用委托对外开放事件,操作控件时可以及时反馈给指定的事件方法。 public delegate void EventHandle(string name); public event EventHandle executeevent; 可以使用 executeevent 来执行相关的代码.动态增加原创 2016-11-21 11:30:11 · 1312 阅读 · 0 评论 -
wsdl文件生成webservice本地类文件
当只有wsdl文件时,可以使用二种工具生成本地类(.cs)文件 wsdl.exe与svcutil.exe原创 2014-06-06 10:16:32 · 5562 阅读 · 0 评论 -
C#提高反射的调用性能
代码: namespace CommonInterface { /**//// /// 公用的接口 /// public interface IFoo { string getName(); string转载 2011-07-26 09:20:06 · 1755 阅读 · 0 评论 -
WebService写系统日志
string sourcename = "ycsmart"; EventLogEntryType errotype = EventLogEntryType.SuccessAudit; try { EventLog mylog = new EventLog(); if (!EventLog.So转载 2012-01-07 22:36:25 · 8350 阅读 · 0 评论 -
C#在Asp.net中的cookie与session
一、session Session["checkcode"] = ""; String checkcode = Session["checkcode"]; //保存对象 Agent agent = new Agent(); Session["agent"] = agent; //取值 Agent agent = (Agent)Session["原创 2011-11-14 11:36:43 · 759 阅读 · 0 评论 -
wpf CefSharp 与 js交互
通过 NuGet 获取 CefSharp.WpF 组件。xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" //加载//使用控件this.mychrome.MenuHandler = new MenuHandler(); //去掉右键菜单this.my原创 2017-04-06 09:09:28 · 13096 阅读 · 0 评论