VB.net Program to Create an Empty Xml File

You are currently viewing VB.net Program to Create an Empty Xml File

VB.Net program to create an empty XML file

'VB.NET program to create an empty XML file.

Imports System.Xml
Imports System.IO
Imports System.Text

Module Module1
    Sub Main()
        Dim xmlFile As XmlTextWriter

        xmlFile = New XmlTextWriter("Sample.xml", Encoding.UTF8)

        Console.WriteLine("Sample.xml file created successfully")

        xmlFile.Flush()
        xmlFile.Close()
    End Sub
End Module
Sample.xml file created successfully
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply