To create a folder in C# and VB.NET you can use the following snippet.
Sample C#
try { const string path = @"C:\Users\Codesnippets\Desktop\Testfolder\Test1\Test2"; Directory.CreateDirectory(path); } catch (Exception ex) { //handle the exception your way }
Sample VB.NET
Try Const path As String = "C:\Users\Codesnippets\Desktop\Testfolder\Test1\Test2" Directory.CreateDirectory(path) Catch ex As Exception 'handle the exception your way End Try
RT @CodeSnippetsNET: How to create a folder in .NET http://t.co/cmIdi3APBL #csharp #vb #dotnet #programming #code #coding #develop