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

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 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
.......
还有很多,不一一列举了 :)