Free VB.NET Code Snippets, Source Code, Articles, Examples, Tutorials and Programming Help

Archive for the ‘Windows programming’ Category

How to remove duplicates from Generic List (Of String)

I will show you a two ways how to clean up generic list of dupes.
Say that you have a list of Baby names like following:

Dim MyList As New List(Of String)
MyList.Add(”Simon”)
MyList.Add(”Denholm”)
MyList.Add(”Denis”)
[...]

Write to MS Access 2007 Database from VB.NET

This is a very short example about how to write (insert a new record) to MSAccess database from VB.NET.
I believe that the code is well commented so no additional explanation is needed. Enjoy!

Get Drive Type in VB.NET

Dim Drives() As DriveInfo = DriveInfo.GetDrives()
Dim Builder As New System.Text.StringBuilder

Dim Info As DriveInfo
For Each Info In Drives
[...]