|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Is there a shortcut for class properties?Is there a simple way, shortcut, or macro to create a property
skeletons? I would live to be able to type a name and a type and have the property created based on that info. Private mLastName as String Public Property LastName() as String Get Return mLastName End Get Set (ByVal value as String) mLastName = value End Set End Property Is this possible? Try code snippets.
In the code editor, type ? and hit Tab. This brings up a menu of code snippets that you can insert. When you drill down to the one you want (Common Code Patterns / Properties and Procedures / Define a property), when it shows the final list, if you hover your mouse over one, or use the keyboard to highlight one, the tooltip will give you a shortcut. For "Define a Property", it's "Property". If you know the shortcut, you can use these in the code editor by typing the shortcut and hitting Tab, and it will insert the code for you. So type Property<Tab> in the code editor, and it will insert the structure for a property. You can create your own Code Snippets, too. MS has a Code Snippet Editor that lets you look at all of the ones already there, as well as develop your own, that someone outside of MS wrote, that works really well. Search MSDN for it if you want it. Good luck. Robin S. Show quoteHide quote "Mike Edgewood" <itm***@gmail.com> wrote in message news:1163524756.494872.320910@h54g2000cwb.googlegroups.com... > > Is there a simple way, shortcut, or macro to create a property > skeletons? > > I would live to be able to type a name and a type and have the property > created based on that info. > > Private mLastName as String > Public Property LastName() as String > Get > Return mLastName > End Get > Set (ByVal value as String) > mLastName = value > End Set > End Property > > > Is this possible? > Thanks.
Too bad they don't offer a dialog box where you could just fill in <privateVarName>, <PropName>, <Type> Looking for ways to shortcut object creation for Object-Relational mapping using CSLA. Show quoteHide quote On Nov 14, 12:28 pm, "RobinS" <Rob...@NoSpam.yah.none> wrote: > Try code snippets. > > In the code editor, type ? and hit Tab. > > This brings up a menu of code snippets that you can insert. > > When you drill down to the one you want (Common Code Patterns / > Properties and Procedures / Define a property), when it > shows the final list, if you hover your mouse over one, > or use the keyboard to highlight one, the tooltip will > give you a shortcut. For "Define a Property", it's "Property". > > If you know the shortcut, you can use these in the code > editor by typing the shortcut and hitting Tab, and it will > insert the code for you. > > So type Property<Tab> in the code editor, and it will insert > the structure for a property. > > You can create your own Code Snippets, too. MS has a Code > Snippet Editor that lets you look at all of the ones already > there, as well as develop your own, that someone outside > of MS wrote, that works really well. Search MSDN for it > if you want it. > > Good luck. > Robin S. > > "Mike Edgewood" <itm***@gmail.com> wrote in messagenews:1163524756.494872.320***@h54g2000cwb.googlegroups.com... > > > > > Is there a simple way, shortcut, or macro to create a property > > skeletons? > > > I would live to be able to type a name and a type and have the property > > created based on that info. > > > Private mLastName as String > > Public Property LastName() as String > > Get > > Return mLastName > > End Get > > Set (ByVal value as String) > > mLastName = value > > End Set > > End Property > > > Is this possible? Mike Edgewood wrote:
> Too bad they don't offer a dialog box where you could just fill in In a sense, it does. When you type Property<tab> you get a skeleton> <privateVarName>, <PropName>, <Type> > with "fields". You just fill in the fields for the type, privatemembernamd and property name. The rest is updated automatically.
Application performance decrease after deleting rows
Check for Duplicate Appointment Times Sound with New System.Media.SoundPlayer() Hiding Default Constructor in VB Express 2005 (Public Not Creatable in VB6) .NET Serialization Quest New SQL Express 2005 ? Directory.Getfiles search pattern Cannot open a database from a previous version of your application Help!! Dynamic Textbox, validation requiredFieldValidator Get Product Keys |
|||||||||||||||||||||||