Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

VS2005 Formatting?

Back to Forum: Tech Off
  • User profile image
    nihilist

    Is there any way to reformat a class in VS2005 so that the fields are at the top, acessors below them, and methods following?

    Basically, can this:

    private int _id;

    public int ID {
    get { return _id; }
    set { _id=value; }
    }

    private int _level;

    public int Level {
    get { return _level; }
    set { _level=value; }
    }

    Become this (without having to manually move everything around):

    private int _id;
    private int _level;

    public int ID {
    get { return _id; }
    set { _id=value; }
    }

    public int Level {
    get { return _level; }
    set { _level=value; }
    }

    Eclipse has the functionality, and I got used to it. Just trying to keep things lazy. Smiley

  • User profile image
    Ang3lFir3

    best bet is to look around in the macro projects.... and write a custom macro...

    the first bit looks like it was written using code snippets which is great but i find it can be hard to read.....

    i don't actually have a macro to do this (or don't know of one) so i don't have anything to share... but shouldn't take you too long to write....

  • User profile image
    nihilist

    Yeah, I was using code snippets to do so.  I got used to certain aspects of Eclipse (yes, it does do some things well!), including the auto-generation of accessors.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.