zoukankan      html  css  js  c++  java
  • [Tip] Use C# snippet to be more productive

    Snippet is so convenient to use in C#!

    I need to get the way / list of getting snippets in C# later on really!

    Now give a good example of using snippet to write switch:

    enum Months { Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec }

    Months curMonth = Months.Feb;

    Now go to the maggic:

    1. type sw, and TAB twice.

    2. Now you get an blank switch with a green area.

    3. Input curMonth as the wanted data to be switched.

    4. Oh, the green area is still there. Press Enter, and now you get:

      switch (curMonth)
                {
                    case Months.Jan:
                        break;
                    case Months.Feb:
                        break;
                    case Months.Mar:
                        break;
                    case Months.Apr:
                        break;
                    case Months.May:
                        break;
                    case Months.Jun:
                        break;
                    case Months.Jul:
                        break;
                    case Months.Aug:
                        break;
                    case Months.Sep:
                        break;
                    case Months.Oct:
                        break;
                    case Months.Nov:
                        break;
                    case Months.Dec:
                        break;
                    default:
                        break;
                }

    Go on learning!

  • 相关阅读:
    .NET: 如何在宿主中动态加载所有的服务
    SharePoint : 自定义权限设置中可能遇到的问题
    在javascript中进行cookie的读写操作
    .NET : 如何读取数据库中的bmp图片数据
    Microsoft Security Essential
    利用ashx和ajax实现表格的异步填充
    IPV6
    Windows 7 : 开发人员资源
    SQL Server : 使用SQL Express的User Instance特性
    .NET : 如何在Windows Forms中使用DataRepeater控件
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1671152.html
Copyright © 2011-2022 走看看