惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - greater

Matlab 7.0不断重启问题解决方法 安装Matlab过程中遇到拒绝访问怎么办? NUnit图解(一) [翻译]Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition 第二十四章 LINQ API编程(三) [翻译]Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition 第二十四章 LINQ API编程(二) [翻译]Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition 第二十四章 LINQ API编程(一) 迷人舞步 难译的英文单词 Linq 之Expression Tree再思考 Linq To SQL分页失败后引发的思考 Linq之查询非泛型集合 函数式编程的浅议 Linq操作符之筛选特定位置的元素 Linq与斐波那契数列共舞 Linq的那些事——从Linq扩展方法回顾C#语言基础 Linq To Object实例之过滤字符集 Linq之C#3.0语言扩展 Linq to DataSet 之Access查询 从101 LINQ Samples开始
VS2008代码段快捷方式小记
greater · 2008-07-11 · via 博客园 - greater

微软的IDE为程序员提供了很多的方便而之前就看到过园子里的朋友发过关于代码段(Snippet)的文章,最后会列举一些,这里花点时间把除了VAssist X之外的,微软VS2008自带的代码段快捷方式贴一下,希望有用。按字母顺序:

特殊字符

#if true
#endif
~ 析构函数代码段
代码段

A~J




Attribute (属性模型代码段)
checked
class
ctor (构造函数)
cw   (Console.WriteLine代码段)
do
else
enum (枚举)
equals代码段
Exception

for
foreach
forr (for逆向代码段)

if
indexer(索引器)
interface(代码段)
invoke(安全调用事件代码段)
iterator(简单迭代器代码段)
——————————简单迭代器代码段示例——————————————————————
public System.Collections.Generic.IEnumerator<ElementType> GetEnumerator()
        
{
            
throw new NotImplementedException();
            
yield return default(ElementType);
        }

——————————————————————————————————————————
iterindex
——————————iterindex示例——————————————————————————————
 
public MyViewIterator MyView
        
{
            
get
            
{
                
return new MyViewIterator(this);
            }

        }


        
public class MyViewIterator
        
{
            
readonly TypeSystem outer;

            
internal MyViewIterator(TypeSystem outer)
            
{
                
this.outer = outer;
            }


            
// TODO: provide an appropriate implementation here
            public int Length get return 1; } }

            
public ElementType this[int index]
            
{
                
get
                
{
                    
//
                    
// TODO: implement indexer here
                    
//
                    
// you have full access to TypeSystem privates
                    
//
                    throw new NotImplementedException();
                    
return default(ElementType);
                }

            }


            
public System.Collections.Generic.IEnumerator<ElementType> GetEnumerator()
            
{
                
for (int i = 0; i < this.Length; i++)
                
{
                    
yield return this[i];
                }

            }

        }

——————————————————————————————————————————————————

L~Z

lock

mbox (MessageBox.Show())
namespace
prop (
public int MyProperty getset; } )
propa 
——————————————————————————————————————————————————————
        
public static int GetMyProperty(DependencyObject obj)
        
{
            
return (int)obj.GetValue(MyPropertyProperty);
        }


        
public static void SetMyProperty(DependencyObject obj, int value)
        
{
            obj.SetValue(MyPropertyProperty, value);
        }


        
// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc
        public static readonly DependencyProperty MyPropertyProperty =
            DependencyProperty.RegisterAttached(
"MyProperty"typeof(int), typeof(ownerclass), new UIPropertyMetadata(0));

——————————————————————————————————————————————————————
propdp
——————————————————————————————————————————————————————
        
public int MyProperty
        
{
            
get return (int)GetValue(MyPropertyProperty); }
            
set { SetValue(MyPropertyProperty, value); }
        }


        
// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc
        public static readonly DependencyProperty MyPropertyProperty =
            DependencyProperty.Register(
"MyProperty"typeof(int), typeof(ownerclass), new UIPropertyMetadata(0));
——————————————————————————————————————————————————————
propg :         
public int MyProperty getprivate set; }
sim :
————————————————————————————
        
static int Main(string[] args)
        
{

            
return 0;
        }

——————————————————————————
struct
——————————————————————————
static void Main(string[] args)
        
{

        }

——————————————————————————
switch
try
tryf
unchecked
unsafe
using
wde(依赖属性代码段)
wdp(工作流活动中创建依赖属性代码段)
while

相关文章:
http://www.cnblogs.com/shanyou/archive/2007/11/20/965024.html
http://www.infoq.com/news/2007/11/SnippetEditor
http://www.cnblogs.com/xiaoxijin/archive/2007/03/30/694569.html
http://www.cnblogs.com/xiaoshatian/archive/2006/12/31/608479.html
http://www.cnblogs.com/heekui/archive/2007/03/13/672532.html
http://www.cnblogs.com/island/archive/2007/10/04/cscodesnippet.html
.......
还有很多,不一一列举了 :)