Create a FileInfo Using VB.NET

In this article I describe how to create FileInfo in VB.NET.
  • 2213

Create a FileInfo

A FileInfo object is created using the default constructor that takes a string as a file name with a full path.

Imports System.IO

Module Module1

    Sub Main()

        Dim fileName As String = "C:\Temp\MaheshTXFI.txt"

        Dim fi As New IO.FileInfo(fileName)

        File.Create(fileName)

        Console.ReadLine()

    End Sub

End Module

 

Output:

 create Fi;eInfo i.jpg

Categories

More Articles

© 2018 DotNetHeaven. All rights reserved.