Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / VB

The best Way to use snippets in .net

1.67/5 (3 votes)
17 Jun 2010CPOL 8.9K  
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)