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 (4)

  1. DarthPedro says:

    Yeah, I find this feature really useful.

  2. Christian Harlass says:

    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?

  3. Louis Parks says:

    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.

  4. vcsjones says:

    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.