随笔分类 -  C#基础

摘要:1 using System; 2 using System.IO; 3 using System.Text; 4 5 namespace CaptureData 6 { 7 /// 8 /// 随便写的一个日志类哦 9 /// 10 public class Log 11 { 12 private static o... 阅读全文
posted @ 2016-07-20 14:00 wujf 阅读(270) 评论(0) 推荐(0) 编辑
摘要:public class Bean { public Bean() { } public static String Current { get { if (guid == null) guid = Guid.NewGuid().ToString(); return guid; } } public 阅读全文
posted @ 2016-02-21 22:20 wujf 阅读(317) 评论(1) 推荐(0) 编辑
摘要:定义跨域handle public class CorsHandler : DelegatingHandler { const string Origin = "Origin"; const string AccessControlRequestMethod = "Access-Control-Re 阅读全文
posted @ 2016-01-30 15:57 wujf 阅读(1162) 评论(0) 推荐(0) 编辑
摘要:webapi代码如下: public string Get(int id) { var callback = HttpContext.Current.Request["callback"]; var u = new User { Name = "AA", Age = id }; var result 阅读全文
posted @ 2016-01-30 15:18 wujf 阅读(494) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Net.Http.Formatting; 4 using System.Web.Http; 5 6 namespace MvcTest 7 { 8 pub... 阅读全文
posted @ 2016-01-10 14:33 wujf 阅读(557) 评论(0) 推荐(0) 编辑
摘要:背景: 公司的老框架里的登录信息用的MemoryCache保存的,为了实现单用户登录(即一个账号不能同事登录),需要在登录前对已经登录的信息做遍历。大致思路如下:本方法可用于清除所有的缓存。1、HttpRuntime.Cache System.Collections.IDictionaryEnum... 阅读全文
posted @ 2015-02-05 17:25 wujf 阅读(999) 评论(0) 推荐(0) 编辑
摘要:面试经常碰到抽象类与接口的差别,总结如下:抽象类的成员可以具有访问级别,而接口的成员全部public级别抽象类可以包含字段,而接口不可以,抽象类可以继承接口,而接口不能继承抽象类抽象类的成员可以具有具体实现,而接口不行抽象的子类可以选择性实现其基类的抽象方法,而接口的子类必须实现其实不懂,不做程序架... 阅读全文
posted @ 2015-01-26 16:33 wujf 阅读(963) 评论(4) 推荐(0) 编辑

点击右上角即可分享
微信分享提示