CodeRush For .Net 使用-------代码编写

下面的是单键模板. Most of these have narrow contexts associated with them, so the same letters can be used as variables if needed.

模板

含义内容
./* */在表示字符串的“”内,不会展开
~析构在类的主体
b{
}
在表示字符串的“”内,不会展开
c创建一个新类必须在空行展开,可以在命名空间或类中生效
ePublic event...只会在类中展开
ffalse只会在程序块中展开
f域声明(字段)只会在类的主体中展开
g属性 "get" 访问器
i接口声明在命名空间的主体中展开
lelse在程序块中展开
m方法声明类、方法、接口中展开,但不会在方法或属性中展开
nnull在程序块中展开
p属性声明类、方法、接口中展开,但不会在方法或属性中展开
r智能的“return”在程序块中展开
s属性set访问器仅在属性中展开
s结构声明仅在命名空间的主体内展开
ttrue仅在程序块中展开

模板别名列表

Template

Alias
bbk
f没有别名
ffi
lll
n没有别名
rrr
t没有别名


在单键模板中的归类:

类型声明:

Verb

Meaning

cDeclare Class
iDeclare Interface
sDeclare Struct


成员声明:

Member to Declare

Verb
Methodm
Propertyp
Fieldf


返回值:
Verb

Meaning

r

Return value

对于返回值,可以输入:r参数 的形式来展开为return XXXX

Noun

Value

'single-quoted character
"double-quoted string
0zero
1one
-1-1
ffalse
nnull
ttrue
ththis

比如rn,就是展开为return null;

即如下形式:
Template

Expansion

r(Smart return)
r'return '|';
r"return "|";
r0return 0;
r1return 1;
r-1return -1;
rfreturn false;
rnreturn null;
rtreturn true;
rthreturn this;


表达式:
当在一个变量后,输入“=”后,继续输入下面的字母有如下效果:
Noun

Value

ffalse
nnull
ttrue
ththis
vavalue

即:当输入 bool  isok = f 后,再按空格,会自动展开为 bool  isok = false


Template

Expansion

=f=  false;
=n=  null;
=t=  true;
=th=  this;
=va=  value;

在“=”左边,有如下效果:

Noun

Property

cChecked
eEnabled
txText
vVisible



Noun

Property

htHeight
ltLeft
tpTop
wdWidth

完全简写的形式,可以用于表达整个式子:
Template

Expansion

c=cCheckState = CheckState.Checked;
c=fChecked = false;
c=iCheckState = CheckState.Indeterminate;
c=tChecked = true;
c=uCheckState = CheckState.Unchecked;
ca=fCapture = false;
ca=tCapture = true;
e=fEnabled = false;
e=tEnabled = true;
v=fVisible = false;
v=tVisible = true;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值