I have the following code in vb6 –
dim iFreeFile as integer
iFreeFile = FreeFile
Open tSendFileName For Output As #iFreeFile
I need to convert this to C# but I am having difficulty. I was trying to use StreamWriter but came across the issue of not knowing where to write it or how to insert the file since it is not on my computer.
Any ideas on how to convert this code to C#? Thanks
Writing to a text file using a streamwriter is pretty straight forward: