3 Replies - 897 Views - Last Post: 25 April 2011 - 08:30 AM

#1 modi123_1  Icon User is online

  • Suitor #2
  • member icon

Reputation: 11593
  • View blog
  • Posts: 45,752
  • Joined: 12-June 08

Common snippets...

Posted 21 March 2011 - 12:06 PM

Has anyone plugged in custom snippets? If so of what?

I got so tired of retyping out the components of 'execute non query' or 'adapter' calls I broke down and added my usual format to a snippet. I'll probably forget how to piece the code together in a few weeks, but by then my monkey reflexes kick in and I can zone out while pushing the button for my calls.
Is This A Good Question/Topic? 1
  • +

Replies To: Common snippets...

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 781
  • View blog
  • Posts: 5,101
  • Joined: 08-December 08

Re: Common snippets...

Posted 24 April 2011 - 08:00 PM

I have the following snippets on "quick dial":
  • WebRequest / response handling
  • OAuth signature generation
  • Stream to byte[] conversion
  • Converters (for Silverlight applications) - e.g. IntToString, BoolToVisibility
  • Tons of managed WinAPI implementations

Was This Post Helpful? 1
  • +
  • -

#3 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 448
  • View blog
  • Posts: 1,504
  • Joined: 28-April 09

Re: Common snippets...

Posted 24 April 2011 - 08:21 PM

I need to start creating more snippets. I mostly work with asp.net and only snippets I've created so far are ones to create properties that use ViewState or Session to store and retrieve the values. There are lots of instances where I think to myself that I should convert what I'm doing into a snippet but then I never take the time to actually do so. It would probably be better to take the little bit of time now to create the snippet to save lots of time in the future by reducing the repetitive typing.
Was This Post Helpful? 0
  • +
  • -

#4 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1532
  • View blog
  • Posts: 5,969
  • Joined: 21-March 08

Re: Common snippets...

Posted 25 April 2011 - 08:30 AM

I added 6 snippets for my latest project. Mainly dealing with database access. I created a snippet for getting one record back with no parameters, one record with params, multiple records no params, multiple records with params, non-query with no params, and non-query with params.

So my multiple records with params would look like this..


Then I just fill in the necessary information. Man this made it so much easier than typing this same code 200 times.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1