次の方法で共有


Mark Davis discusses a C# feature....

and it isn't about Whidbey, oh my... :)

Visual C# 2003 "Implement Interface" feature
Just discovered a great tip for Visual C# 2003.

If you implement an interface (or event/delegate) on your class and don't want to type all the methods, just type the interface name in your class derivation list and Intellisense will display a tooltip saying “Press TAB to insert stubs for <interfacename>”. Pressing 'TAB' will insert stub method implemenations into your class. Very cool timesaver!

Comments

  • Anonymous
    June 17, 2004
    Yeah, I find this feature really useful.
  • Anonymous
    June 18, 2004
    Yep, but if you decide later on change that interface - where is Intellisense then? You get the error message from the compiler and that's it. The Eclipse folks are a bit better here...

    Or am I missing something?
  • Anonymous
    June 19, 2004
    IntelliSense has previously only been used in active scenarios. What I mean by that is, it appears in response to direct user action (typing something in a given context, Ctrl+Space, etc.). What you are suggesting sounds more like refactoring/repurposing than what I understand IntelliSense to be.
  • Anonymous
    June 24, 2004
    Kudos to you. I have known about that for quite some time, but I am tired of seeing stuff on C# 2.0 and Whidbey. I don't mess around with beta stuff.