473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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?

Nov 14 '06 #1
3 1517
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<Tabin 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" <it****@gmail.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.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?

Nov 14 '06 #2
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.

On Nov 14, 12:28 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
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<Tabin 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.comwrote in messagenews:11**********************@h54g2000cwb.g ooglegroups.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?
Nov 14 '06 #3
Mike Edgewood wrote:
Too bad they don't offer a dialog box where you could just fill in
<privateVarName>, <PropName>, <Type>
In a sense, it does. When you type Property<tabyou get a skeleton
with "fields". You just fill in the fields for the type,
privatemembernamd and property name. The rest is updated automatically.

Nov 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tolisss | last post by:
Hi does ne1 know how could i make the events window appear using keyb like we have F4 for the properties window i need a shortcut for the events also can ne1 help me on this please ...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
5
by: Steven | last post by:
I have some text boxes on a form in MS Access 2000. When I right click in them I don't get any shortcut menu at all. I want the normal cut, copy, and past menu to come up. In the "Startup", I...
2
by: Ganesh | last post by:
I have to change the tartget property of a windows start->Program->X's shortcut properties using c program. Do we have any function for that ? please reply me ASAP.. as it is urgent !
1
by: Steve Teeples | last post by:
Is there a class within C# that reveals the properties of a typical shortcut on the desktop? I'm looking for the information about the "Target" and "Start in" fields within a shortcut. --...
1
by: Steve Teeples | last post by:
Is there a class within C# that will allow me to look at the properties of a shortcut on the desktop? I'd like to look at the start locations of specific shortcuts. -- Steve
7
by: GrandpaB | last post by:
I would appreciate assistance learning how to create a Desktop shortcut in my setup project. In the left pane of the Setup/File System window I right-clicked User's Desktop. From the contex...
0
by: Newbie Coder | last post by:
A few years ago I created a shortcut class using the correct functions/COM interfaces(IShellLinkA,/IShellLinkW/GUID's...) I use this class to create shortcuts the correct way not streamwriter but...
10
by: Matthew Wells | last post by:
I'm trying to make a shortcut that will open an mdb in the same folder as the shortcut - regardless of where the file/shortcut may be. In other words, I want to be able to copy and paste the two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.