会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
春天花会开,
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
2022年4月16日
C#扩展方法
摘要: public class A { } public static class B { public static void setError(this A a,int errorCode)//定义类A的扩展方法,前面是类型后面是参数 { } } public class C { public voi
阅读全文
posted @ 2022-04-16 17:04 春天花会开,
阅读(29)
评论(0)
推荐(0)
2022年3月24日
事件的定义
摘要: //定义事件,关键字'event',类型EventHandler<LogPrintEventArgs> public event EventHandler<LogPrintEventArgs> LogPrintCompleted { add { _logPrintCompleted -= value
阅读全文
posted @ 2022-03-24 17:37 春天花会开,
阅读(68)
评论(0)
推荐(0)
2021年5月8日
c#左移右移运算符-2的乘方运算
摘要: 【例子】: x/(2ˆ1)= x>>1x/(2ˆ2)= x>>2x/(2ˆ3)= x>>3x/(2ˆ4)= x>>4 ... x/(2ˆ30)= x>>30 【单位换算】 1 byte=1/(2^30)GB 【应用】:获取磁盘空间容量大小,byte转为GB显示 创建DriveInfo的实例drive
阅读全文
posted @ 2021-05-08 15:36 春天花会开,
阅读(236)
评论(0)
推荐(0)
上一页
1
2
3
4
公告