VS2013自動註釋插件

在程序編寫的時候,你是否見過這種寫法?整個項目每一個cs文件頭部都包含一個,版權,版本等信息的註釋頭?緩存

相似這個類文件:微信

 

/*************************************************************************
    ========================微信企業號開發本地調試========================
    做者:GarsonZhang
    QQ:382237285 
    小廣告:【winform快速開發框架,請關注GZFramwork,關注做者GarsonZhang】
 
    感謝你使用本程序,將開源進行到底
    若是你有新需求,請聯繫我,增長對你的支持
 ************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QYWXLocalDebug
{
    public class ConvertEx
    {
        public static string ToString(object obj)
        {//類型轉換
            string tmp = string.Empty;
            try
            {
                tmp = obj.ToString();
            }
            catch
            {
                tmp = string.Empty;
            }
            return tmp;
        }

        public static int ToInt(object obj)
        {
            int tmp = 0;
            try
            {
                tmp = Convert.ToInt32(obj);
            }
            catch
            {
                tmp = 0;
            }
            return tmp;
        }

        public static int ToInt(object obj, int ErrorValue)
        {
            int tmp = ErrorValue;
            try
            {
                tmp = Convert.ToInt32(obj);
            }
            catch
            {
                tmp = ErrorValue;
            }
            return tmp;
        }
    }
}
View Code

 

百度一下,不難發現網上不少解決辦法,其中最多見的就是:http://blog.csdn.net/gelupu/article/details/18715629框架

按照這種方法,的確能夠達到目的,可是若是同時兩個項目,想註釋頭不同呢?而又不每次複製呢?ide

就很棘手了吧。鑑於這種需求,我特地寫了一個註釋插件【vstCustomerNote.vsix】,本人的使用環境爲VS2013工具

 

首先到這裏下載插件 http://pan.baidu.com/s/1iC6IUspa

下載後解壓獲得兩個文件.net

image

安裝步驟:插件

1、dll是要添加到全局緩存,添加方法見http://blog.csdn.net/flywei2012/article/details/9056867調試

安裝截圖(注意用管理員運行)code

image

2、安裝vstCustomerNote.vsix插件(雙擊安裝):

image

image

 

安裝完成後啓動VS,查看工具下面的擴展和更新:

image

image

 

若是有如圖所示的插件,即爲安裝成功(安裝失敗請聯繫Q:382237285),能夠進行以下演示:

1

具體在使用過程當中體會吧

相關文章
相關標籤/搜索