- 博客(3)
- 收藏
- 关注
原创 C# 方法中的this参数
先看下面的代码: public static class StringExtension { public staticvoid Foo(this string s) { Console.WriteLine("Foo invoked for {0}",s); } } 为什么这里会有一个this关键字,做什么用?其实这就是扩展方法!这个扩展方法在静态类中声明,定义一个
2012-12-28 16:13:48 6537 2
转载 efcodefirst安装不了,This package (or one of its dependencies) contains PowerShell scripts and needs to
This package (or one of its dependencies) contains PowerShell scripts and needs to be installed from the Package Manager Console. 背景①:利用NuGet来安装EFCodeFirst方法 ①我们可以利用NuGet包管理器(安装ASP.NET MVC3时会自
2012-12-27 16:45:58 1063
原创 .net的Timer
基于服务的Timer System.Timers.Timer 基于线程的Timer System.Threading.Timer 基于窗体的Timer System.Windows.Forms.Timer 1、System.Threading.Timer,希望在另一个线程上定时执行后台任务时,这个定时器是最好的定时器。 2、System.Windows.Forms.Timer。构造该类的
2012-12-06 13:42:16 332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人