A nice collection of VB.NET Programming Hacks
Here is what is available
General
* Aliassing a namespace
* Memory usage for all processes
* Get the commandline parameters
* Get the computername
* Getting text from the clipboard
* Saving text on the clipboard
* Getting the freespace on a drive
* Getting memoryusage of one process
* Get the total space used by a drive
* Path to UNC
* Impersonating an administrator
* Programaticaly changing the Ignore addresses in the proxy settings
Strings
* Use StringBuilder to concatenate strings
Dates
* Add day, month, year to date
* Add time to a date (hours, minutes, seconds)
* Substract Time from a date (hours, minutes, seconds)
* Substract from a date (days, months, years)
* What day of the week is a certain date
* Is this year a leapyear?
* Difference in days between 2 dates
ADO.NET
* Use commandparameters instead of string concatenation
Forms
* Opening a form on a specified monitor
* Show a form in a form
* Open a form as modal
* Open a form
* MDI
* Hide a form on closing
Controls
* Use TextBox.AppendText instead of concatenating strings
LINQ
* Using Linq to Order directories by creation datetime
Reflection
* Getting a property using reflection part 1
* Getting a property using reflection part 2
* Getting a property using reflection part 3
* Getting a property using reflection part 4
* Create an instance of class from a string using reflection
* Set a readonly property via reflection
* Setting a private field using reflection
* Getting a private field using reflection
Patterns
* Use Singletonprovider instead of the Singleton pattern
* Invoke Singletonprovider giving a string as classname
Network
* See if the network is available
* Pinging another computer
* Getting the current computer's IP-Address
* Determining if an IPAddress is IPv4 or IPv6
* Creating an IPv6 address the correct way
* How to create an IPv4 address the correct way
* Sending a mail with attachements
File handling
* Checking if a file exists
* Deleting a file
* Checking if a directory exists
* Deleting a directory
* Get all the files from a certain directory
* Get all the files with a certain extension from a directory
* Getting a file's extension from a string
* Getting a file's filename from a string
* Getting a file's filename from a string without the extension
* Combining two strings to make a path
No comments:
Post a Comment