Visual Studio 内置快速生产代码简写集合

9 篇文章 0 订阅

从cnblog上面找到的关于vs内置转化代码的资料。供大家参考。

https://www.cnblogs.com/kewolf/p/4588360.html#

 

 

首字母简写生成代码
aattachedPropertypublic static readonly ??? propertyNameProperty = ???.RegisterAttached(
    "propertyName",
    typeof(propertyType),
    typeof(HomeController),
    new PropertyMetadata(default(propertyType)));

public static void SetpropertyName(DependencyObject element, propertyType value)
{
    element.SetValue(propertyNameProperty, value);
}

public static propertyType GetpropertyName(DependencyObject element)
{
    return (propertyType)element.GetValue(propertyNameProperty);
}
Attribute [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
 private sealed class MyAttribute : Attribute
 {
     // See the attribute guidelines at
     //  http://go.microsoft.com/fwlink/?LinkId=85236
     private readonly string positionalString;

     // This is a positional argument
     public MyAttribute(string positionalString)
     {
         this.positionalString = positionalString;

         // TODO: Implement code here
         throw new NotImplementedException();
     }

     public string PositionalString { get; private set; }

     // This is a named argument
     public int NamedInt { get; set; }
 }
   
cchecked 
class  
ctor public A1()
{
}
ctx 
cwConsole.WriteLine();
   
ddodo{

}while(ValidateRequest);
   
eearTYPE[] types = new TYPE[] { };
  
enumenum MyEnum
{
}
equals 
  
Exception 
  
else 
   
fforfor (int i = 0; i < UPPER; i++)
{

}
  
forrfor (int i = length - 1; i >= 0; i--)
{

}
  
foreachforeach (var VARIABLE in COLLECTION)
{

}
  
fromfrom VAR in ViewEngineCollection
{

}
   
hhalHtml.ActionLink("TEXT", "ACTION", "Account")
   
i  
ifif (ValidateRequest)
{
}
  
invokeEventHandler temp = MyEvent;
if (temp != null)
{
    temp();
}
  
italfor (int i = 0; i < arrayList.Count; i++)
{
      object array = (object)arrayList[i];
}
  
itarfor (int i = 0; i < array.Length; i++)
{
    var a = array[i];
}
  
itdgforeach (var i in ViewData)
{
    var key = i.Key;
    var value = i.Value;
}
  
itdicforeach (DictionaryEntry dictionaryEntry in dictionary)
{   
     object key = (object)dictionaryEntry.Key;
     object value = (object)dictionaryEntry.Value;
}
  
itlifor (int i = 0; i < ViewEngineCollection.Count; i++)
{
     object key = (object)dictionaryEntry.Key;
     object value = (object)dictionaryEntry.Value;
}
  
indexer public object this[int index]
 {
            get
            {
                 /* return the specified index here */
            }
            set
            {
                /* set the specified index to value here */
            }
}
  
interfaceinterface Iinterface
{
}
  
iteratorpublic System.Collections.Generic.IEnumerator<ElementType> GetEnumerator()
{
       throw new NotImplementedException();
       yield return default(ElementType);
}
  
iterindex public class MyViewIterator
 {
     private readonly MyViewIterator outer;

     internal MyViewIterator(MyViewIterator 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 MyViewIterator 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];
         }
     }
 }       
   
llocklock (ViewEngineCollection)
{

}
   
mmbox System.Windows.Forms.MessageBox.Show("Test");
   
nnguidA509913F-295B-480F-A022-854A81045C6E
   
oout Console.Out.WriteLine("");
  
outvConsole.Out.WriteLine("ViewEngineCollection = {0}", ViewEngineCollection);
   
ppci public const int 
  
pcs public const string 
  
proppublic TYPE Type { get; set; }
  
propg public int I { get; private set; }
  
psr public static readonly 
  
psvm  public static void Main(string[] args){}
   
rrtaRedirectToAction("ACTION", "Account")
  
ritarfor (int i = array.Length - 1; i >= 0; i--)
{
     var a = array[i];
}
   
ssfcvar type = ViewEngineCollection as TYPE;

if (type != null)
{
   
}
  
switchswitch (@enum)
{
       
}
  
svmstatic void Main(string[] args)
{
     
}
  
simstatic int Main(string[] args)
{
    
     return 0;
}
  
structstruct MyStruct
{
     
}
   
tthrthrow new 
  
toar(object[])arrayList.ToArray(typeof(object))
  
trytry
{

}
catch (Exception)
{
   
    throw;
}
  
tryftry
{

}
finally
{
   
}
   
uuaUrl.Action("ACTION", "Account")
  
uncheckedunchecked
{
   
}
  
unsafeunsafe
{
   
}
  
usingusing (this)
{
    
}
   
wwhilewhile (true)
{
    
}
   
 
  
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值