Categories

Category Specific RSS

List all files in a directory

This will list all of the files in a directory

List all files in a directory

console version

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInBaiduApp.netBufferDeliciousDiggDiigoWordPressBlogger PostEmailPrintFriendlyShare

show all subfolders

show all subfolders of a drive

show all subfolders

Dim subs() As String

subs = System.IO.Directory.GetDirectories("c:\")

Dim enumerator As System.Collections.IEnumerator

enumerator = subs.GetEnumerator

While enumerator.MoveNext Console.WriteLine(CStr(enumerator.Current)) End While

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInBaiduApp.netBufferDeliciousDiggDiigoWordPressBlogger PostEmailPrintFriendlyShare

Changing the case of a string

This example shows how to change the case of a string using the ToLower and ToUpper methods

Changing the case of a string

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInBaiduApp.netBufferDeliciousDiggDiigoWordPressBlogger PostEmailPrintFriendlyShare

Does a directory exist

This snippet checks whether a specified directory on your system exists

Does a directory exist

Module Module1

Sub Main() ‘checks if a directory exists on your system Dim DirExist As Boolean DirExist = System.IO.Directory.Exists("c:\windows") If DirExist = True Then Console.WriteLine("Directory exists") Else Console.WriteLine("Directory does not exist@") End If System.Console.Read() End Sub

End Module

[…]

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInBaiduApp.netBufferDeliciousDiggDiigoWordPressBlogger PostEmailPrintFriendlyShare

Count words in a string

A simple way of counting words in a string

Count words in a string

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInBaiduApp.netBufferDeliciousDiggDiigoWordPressBlogger PostEmailPrintFriendlyShare