Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Quickly Adding Fields and Thier Properties

Quickly Adding Fields and Thier Properties

Scheduled Pinned Locked Moved Visual Studio
csharpvisual-studio
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sixefftee
    wrote on last edited by
    #1

    does anyone know if vs.net has a way to quickly add a feild and property at the same time. right now i only two ways one, just type it yourself and two, going in to class view and right clicking the class, selecting add field then right clicking again and selecting add property and then actually typing in the code for the get and set methods. i ask this because it seems like a waste of time especially when you have numerous classes with numerous properties. Anyway let know if you know something i don't.

    K E 2 Replies Last reply
    0
    • S sixefftee

      does anyone know if vs.net has a way to quickly add a feild and property at the same time. right now i only two ways one, just type it yourself and two, going in to class view and right clicking the class, selecting add field then right clicking again and selecting add property and then actually typing in the code for the get and set methods. i ask this because it seems like a waste of time especially when you have numerous classes with numerous properties. Anyway let know if you know something i don't.

      K Offline
      K Offline
      Kevin McFarlane
      wrote on last edited by
      #2

      I don't think there's a way of doing this. Your best bet is to write a macro. For example, see http://www.codeproject.com/macro/vscsharpmacros.asp[^] for the general idea. Kevin

      1 Reply Last reply
      0
      • S sixefftee

        does anyone know if vs.net has a way to quickly add a feild and property at the same time. right now i only two ways one, just type it yourself and two, going in to class view and right clicking the class, selecting add field then right clicking again and selecting add property and then actually typing in the code for the get and set methods. i ask this because it seems like a waste of time especially when you have numerous classes with numerous properties. Anyway let know if you know something i don't.

        E Offline
        E Offline
        Eddie Velasquez
        wrote on last edited by
        #3

        Code<Template>[^] might help you.


        If Java had true garbage collection, most programs would delete themselves upon execution - Robert Sewell

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups