Visual Studio Tips
While showing-off the previous tip to a mate I was eagerly pointed in the direction of this link:
http://www.sellsbrothers.com/spout/default.aspx?content=archive.htm#vs.netfunfacts
Chris Sells does it yet again!
Two I like and didn't know about:
-
Let the IDE implement the stubs of an interface function in a class (not a struct):
- Type the name of the interface after the name of the class, e.g. "class Foo : IDisposable".
- In the Class View (Ctrl-Shift-C), navigate to the class, e.g. Foo, and choose the interface you'd like stubs for under Bases and Interfaces for that class.
- In the context menu (Shift-F10), choose Add->Implement Interface.
- Bask in the glory of Don Box (who showed me this trick).
- Let the IDE implement the stub of an virtual function override:
- In the Class View (Ctrl-Shift-C), navigate to the class, e.g. Foo, and choose the method on the base class you'd like to override under Bases and Interfaces for that class.
- In the context menu (Shift-F10), choose Add->Override.
- Bask in the glory of me, who found this all by myself. I found this digging through the .VSZ files on my system. It looks like you can add your own context items to the menus, which sounds like fun...
I recommend to use this with "Synchronize Class View" from the editor context menu.
Update: The two tips above seem to work only for C#.