Create a FileInfo Using VB.NET

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

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

© 2020 DotNetHeaven. All rights reserved.