点滴积累,融会贯通

-----喜欢一切有兴趣的东西

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  268 随笔 :: 0 文章 :: 407 评论 :: 17 引用
VS2005的Code Snippet 很有用,可以加快代码输入,可以自定义很多代码小片段(不过是XML格式的需要自己创建),而且可以在网上升级(不过我到现在都没看到可用的升级)。不过用他的default snippet就已经很爽了。使用时只要输入快捷码,双击tab键就可以自动生成相应的代码片断
Default Code Snippets

Code Snippet Name

Description

#if

This code snippet surrounds code with #if and #endif directive.

#region

This code snippet surrounds code with a #region and #endregion directive.

~

This code snippet inserts a destructor.

attribute

This code snippet inserts a declaration for a customized attribute, which is a class derived from System.Attribute.

checked

This code snippet surrounds code with a checked block.

class

This code snippet inserts a class declaration.

ctor

This code snippet inserts a constructor.

cw

This code snippet inserts a Console.WriteLine statement.

do

This code snippet surrounds code with a do while block.

else

This code snippet inserts an else block.

enum

This code snippet inserts an enum declaration.

equals

This code snippet overrides the Equals method inherited from the System.Object type.

exception

This code snippet inserts the declaration of an application exception, which is derived from System.Exception.

for

This code snippet surrounds code with a for loop.

foreach

This code snippet surrounds code with a foreach loop.

forr

This code snippet surrounds code with a decrementing for loop.

if

This code snippet surrounds code with an if block.

indexer

This code snippet inserts an indexer function.

interface

This code snippet inserts an interface declaration.

iterator

This code snippet inserts an iterator.

interindex

This code snippet inserts a named iterator and indexer.

invoke

This code snippet inserts and invokes an event.

lock

This code snippet surrounds code with a lock block.

mbox

This code snippet inserts the MessageBox.Show statement.

namespace

This code snippet surrounds code with a namespace.

prop

This code snippet inserts a property and backing field.

propg

This code snippet inserts a read-only property. Read-only properties have only a get method.

sim

This code snippet inserts an entry point method that is static and returns an integer.

struct

This code snippet inserts a struct declaration.

svm

This code snippet inserts an entry point method that is static and returns void.

switch

This code snippet inserts a switch statement.

try

This code snippet inserts a try-catch block.

tryf

This code snippet inserts a try-finally block.

unchecked

This code snippet surrounds code with an unchecked block.

unsafe

This code snippet inserts an unsafe block.

using

This code snippet surrounds code with a using block.

while

This code snippet surrounds code with a while loop.

posted on 2007-03-23 09:43 小寒 阅读(663) 评论(4)  编辑 收藏 网摘 所属分类: C#编程基础

评论

#1楼  2007-03-23 09:46 OK_008      
代码小片段,感觉使用得很方便,而且可以自己设置。
使用方法就是Ctrl+K 再是Ctrl+X
或者是按右键也可以插入。

  回复  引用  查看    

#2楼  2007-03-23 10:55 幻想曲 [未注册用户]
使用时只要输入快捷码
快捷码如何输?
  回复  引用    

#3楼 [楼主] 2007-03-23 11:51 小寒      
使用的时候只要先输入快揭码,然后在双击Tab键
例如:输入mbox,双击Tab键
就会显示:
global::System.Windows.Forms.MessageBox.Show("Test");
  回复  引用  查看    

#4楼  2007-12-28 23:13 张长弓      
在要插入的地方打"?",接着键入tab键.
  回复  引用  查看    


标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
"五向定位"职业成长路线公开课(上海、南京、大连)
Google站内搜索


相关链接: