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!

  • 相关阅读:
    立则存
    如何在UI控件上绑定一个变量
    欢迎大家使用www.eugene.org.cn访问我的blog
    属性与字段变量的区别
    在C#中联合Excel的Com编程入门
    我和我的土匪奶奶 全集 全 下载 txt
    大菲波数
    Hat's Fibonacci
    Fibonacci 取余,直接做超时
    How Many Fibs? 字符串转换处理
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1671152.html
Copyright © 2011-2022 走看看