Automatically inserting method & function headers from an interface that are being implemented with

Discussion in 'ASP .Net' started by Nathan Sokalski, Nov 21, 2006.

  1. When implementing an interface in VB.NET using Visual Studio .NET 2005, it
    would be nice if I could have the method/function headers inserted
    automatically. Whenever we implement an event (such as Button.Click,
    TextBox.TextChanged, etc.), all we have to do is select the control and
    event from the dropdownlists at the top of the editor. Obviously the
    interfaces (IPostBackDataHandler, ICallbackEventHandler, etc.) are not
    listed there, but because some of the interfaces are used rather often and
    the headers must match the ones defined in the interfaces, I would think
    Visual Studio .NET 2005 would have a way to insert them. Is there a way to
    do this? If so, what is it? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    Nathan Sokalski, Nov 21, 2006
    #1
    1. Advertising

  2. Nathan Sokalski

    RobinS Guest

    Check the code snippets and see if there are any to do what
    you are talking about. If not, you can create your own using
    the Code Snippet editor.

    To see the code snippets, type ? and hit <Tab> in the code
    editor. YOu will get a menu showing a list of types of
    snippets -- just drill down and see if you find one you like.
    If you do, just select it and the code snippet will be
    inserted.

    Note that if you select with the up/down arrows, or hold
    your mouse over the description of the actual snippet,
    it shows a "shortcut". If you type this shortcut into
    the code editor and hit <Tab>, it will insert the code
    for you. For example, property is the shortcut for a
    property.

    Here's the link to a code snippet editor you
    can use to create your own snippets. You can export
    them and make them available to other developers
    if you wish.

    http://msdn2.microsoft.com/en-us/vbasic/ms789085.aspx

    Good luck.
    Robin S.
    -----------------------------------


    "Nathan Sokalski" <> wrote in message
    news:...
    > When implementing an interface in VB.NET using Visual Studio .NET 2005, it
    > would be nice if I could have the method/function headers inserted
    > automatically. Whenever we implement an event (such as Button.Click,
    > TextBox.TextChanged, etc.), all we have to do is select the control and
    > event from the dropdownlists at the top of the editor. Obviously the
    > interfaces (IPostBackDataHandler, ICallbackEventHandler, etc.) are not
    > listed there, but because some of the interfaces are used rather often and
    > the headers must match the ones defined in the interfaces, I would think
    > Visual Studio .NET 2005 would have a way to insert them. Is there a way to
    > do this? If so, what is it? Thanks.
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    >
    RobinS, Nov 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raffael Vogler
    Replies:
    2
    Views:
    341
    Raffael Vogler
    Dec 18, 2003
  2. Replies:
    1
    Views:
    351
    Chris Smith
    May 20, 2004
  3. Replies:
    2
    Views:
    372
    Michiel Konstapel
    Dec 11, 2004
  4. Replies:
    2
    Views:
    378
    Alun Harford
    Feb 8, 2006
  5. Nathan Sokalski
    Replies:
    1
    Views:
    179
    RobinS
    Nov 21, 2006
Loading...

Share This Page