您的位置:首页 > 编程语言

VS2012敲代码技巧

2013-10-10 20:32 246 查看
相应字符+Tab+Tab,可以自动实现代码段。

eg:输入pro再按两次Tab键可自动完成代码段: public int MyProperty { get; set; }

如图:



按两次Tab键后



下面是一些关键字及其说明:

常用:

#if

#region

class

ctor 创建构造函数

cw 输出Console.Write()

do

enum

for

foreach

if

namespace

mbox 输出MessageBox.show()

prop 创建属性

sim 创建int Main()

sum 创建void Main()

struct

switch

testc 创建测试类

testm 创建测试方法

try

tryf

using

while

其它:

Attribute,checked,forr,indexer,invoke,iterator,interindex,lock,,mvcaction3,mvcaction4,mvcpostaction3,mvcpostaction4,propa,propd,profull,propg,unchecked,unsafe,wde,wdp
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: