Quickly Adding Fields and Thier Properties
-
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.
-
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.
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
-
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.
Code<Template>[^] might help you.
If Java had true garbage collection, most programs would delete themselves upon execution - Robert Sewell