【C#】VS 双Tab 代码补全快捷键

cw + Tab + Tab 输出 Console.WriteLine();

Console.WriteLine();

mbox + Tab + Tab 输出 MessageBox.Show()

MessageBox.Show("Test");

if + Tab + Tab 输出 if 块

if (true)
{

}

else +Tab+Tab 输出 else 部分

else
{

}

for+ Tab + Tab 输出 for 循环

for (int i = 0; i < length; i++)
{

}

foreach + Tab + Tab 输出 foreach 循环

foreach (var item in collection)
{

}

do +Tab+Tab 输出 do while 循环

do
{

} while (true);

while +Tab+Tab 输出 while 循环代码块

while (true)
{

}

switch + Tab +Tab 输出 switch 代码块

switch (switch_on)
{
	default:
}

try +Tab+Tab 输出 try catch代码块

try
{

}
catch (Exception)
{

	throw;
}

tryf + Tab + Tab 输出 try finall

try
{

}
finally
{

}

exception +Tab +Tab 输出 异常

public class MyException : Exception
{
	public MyException() { }
	public MyException(string message) : base(message) { }
	public MyException(string message, Exception inner) : base(message, inner) { }
	protected MyException(
	System.Runtime.Serialization.SerializationInfo info,
	System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}

enum + Tab + Tab 输出 enum 枚举代码

enum 
{

}

ctor +Tab+Tab 输出 构造函数代码

public Form1()
{

}

prop + Tab+Tab 输出 字段与属性代码

public int MyProperty { get; set; }

propfull + Tab+Tab 输出 字段与属性代码

private int myVar;

public int MyProperty
{
	get { return myVar; }
	set { myVar = value; }
}

propg +Tab+Tab 输出 只有 get 访问器支持的字段与属性

public int MyProperty { get; private set; }

class +Tab +Tab 输出 class 类名

class MyClass
{

}

svm +Tab+Tab 输出 无返回值void Main()

static void Main(string[] args)
{

}

sim + Tab +Tab 输出 整形的int Main()方法

static int Main(string[] args)
{
	return 0;
}

indexer + Tab + Tab 输出 indexer 索引代码

public object this[int index]
{
	get { /* return the specified index here */ }
	set { /* set the specified index to value here */ }
}

interface +Tab+Tab 输出 interface 接口代码

interface IInterface
{

}

using + Tab +Tab 输出 using 代码块

using (resource)
{

}
  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值