vb.net - How to save a txt file to a predetermined location in vb 2010? -


hi have textbox displays bunch of names on it. names within string called "strnames". i'm trying have save button saves names txt file in predetermined location. here code save button. creates file without list of names. please help!

given fact strnames array of strings use file.writealllines, no need use streamwriter here

private sub button1_click(byval sender system.object, byval e system.eventargs) handles button1.click     file.writealllines("c:\test.txt", strnames) end sub 

this has advantage against streamwriter approach if don't need particular processing input array before writing file, no foreach around array strings , don't need encapsulate streamwriter in using statement ensure proper release of system resources


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -