My customer requires text files to be written in the following format:

"adrian","sigamoney","01","1","B"

No matter what I do I get in file

adrian,sigamoney,01,1,B

I have tried split, replace, adding extra hyphens to string.

Please help urgently.

Member Avatar for Unhnd_Exception
Dim fstream As New System.IO.FileStream("c:\quotations.txt", IO.FileMode.Create)
Dim sWriter As New System.IO.StreamWriter(fstream)

sWriter.WriteLine("""adrian""" & "," & """sigamoney""" & "," & """01""" & "," & """1""" & "," & """B""")

sWriter.Close()
fstream.Close()


'
'OR
'

Dim firstName As String = "adrian"
Dim lastName As String = "sigamoney"
Dim q As String = """"

sWriter.WriteLine(q & firstName & q & "," & q & lastName & q & "," & """01""" & "," & """1""" & "," & """B""")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.