//
you're reading...
.NET 2.0

Snippets rule!

prop [tab] [tab] string [tab] username [tab] Username

That is all the typing you need to do to create a new instance read/write property in VS2005. If you want a read only property you need only replace prop with propg.

Unfortunately I didn’t see a snippet to create a static property in the same fashion. That is easily remedied though since new snippets can be added through the Code Snippets Manager (Ctrl+K, Ctrl+B).

Expect a snippet from me soon to automatically add Changing/Changed events with protected On methods along with the newly created property.

Advertisements

About James

I am a Senior Developer/Consultant for InfoPlanIT, LLC. I previously spent over 7 years as a Product Manager for what eventually became ComponentOne, a division of GrapeCity. While there, I helped to create ActiveReports 7, GrapeCity ActiveAnalysis, and Data Dynamics Reports.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archive

%d bloggers like this: