Get the Size of a Folder (and subfolders) With VB.NET 2.0

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic.NET

More information:
With this function you can get the size, in bytes, of a folder. There is an optional variable that you can set to include subfolders. This for VB.NET 2.0 (VS 2005).

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: