Click here to Skip to main content
15,887,336 members
Articles / Programming Languages / Visual Basic
Tip/Trick

The best Way to use snippets in .net

Rate me:
Please Sign up or sign in to vote.
1.67/5 (3 votes)
17 Jun 2010CPOL 8.6K   3   2
read this article if you really are a code snippet freak...
<pre lang="css">Type ? and hit your TAB key and you will get them.
If you know the first letters of your snippet, like for example “property”, type “prop?” and then hit the TAB key. The snippet that creates a property in a class will be launched.
Here are the most used snippets:
Application – Compiling, Resources and Settings -&gt; Load an Assembly at Run Time; appLoad
Application – Compiling, Resources and Settings -&gt; Write to a Text File; appLog
Collections and Arrays -&gt; Iterate through a collection; colIter
Collections and Arrays -&gt; Locate an Element in an Array; arrLoc
Connectivity and Networking -&gt; Create an E-Mail Message; conEmail
Data – Designer features and ADO.NET -&gt; Create a Server based SQLConnection to SQL Server; adoCreateSqlConn
Data – Designer features and ADO.NET -&gt; Create a Parameterized SELECT Command; adoSelectwParams
Data Types – defined by Visual Basic -&gt; Convert an Array of Bytes into a String; typeByteStr
Data Types – defined by Visual Basic -&gt; Parse an E-Mail Address; typeParseEmail
File System – Processing Drives, Folders and Files -&gt; Copy a File; filCopyFile
File System – Processing Drives, Folders and Files -&gt; Create a File; filCreateFile
File System – Processing Drives, Folders and Files -&gt; Read Text from a File; filReadText
File System – Processing Drives, Folders and Files -&gt; Write Text to a File; filWriteText
Math -&gt; Get a Random Number using the Random Class; mathRand
Security -&gt; Encrypt a String; secEncrypt
Security -&gt; Find the Current User’s Name; secUser
Windows Forms Applications -&gt; Forms -&gt; Determine which Control on a Windows Form is selected; formSelect
Windows Forms Applications -&gt; Forms -&gt; Display a Windows Form; formNew
Windows Forms Applications -&gt; Controls and Components -&gt; Add Menu Items to Windows Forms; menuAddItems
Windows Forms Applications -&gt; Sound -&gt; Play a Sound; sndPlay
Windows Operation System -&gt; System Information -&gt; Determine Desktop Display Resolution; sysRes
Windows Operation System -&gt; System Information -&gt; Determine the Windows System Directory; sysDir
XML -&gt; Iterate named nodes in XML Document; xmlIter
XML -&gt; Read XML from a File Using XmlTextReader; xmlReadTxt</pre>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralCould you please recheck and update your article once again,... Pin
ThatsAlok25-Jul-10 22:53
ThatsAlok25-Jul-10 22:53 
GeneralReason for my vote of 1 The best way? it isn't even readable... Pin
Luc Pattyn19-Jun-10 1:53
sitebuilderLuc Pattyn19-Jun-10 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.