TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Matthew Pawelke
NA
71
0
specify file name and path in streamwriter
May 28 2010 1:44 PM
I want to create a new notepad file and specifiy file location and name i have: i'm getting an error that says empty path name is illegal
SaveFileDialog
saveFile =
new
SaveFileDialog
();
string
filePath = saveFile.FileName;
StringBuilder
sb =
new
StringBuilder
();
if
(saveFile.ShowDialog() ==
DialogResult
.OK)
{
... assign data to string
}
StreamWriter
sw =
new
StreamWriter
(filePath);
sw.WriteLine(sb);
sw.Close();
Reply
Answers (
13
)
send program to numerous computers
Dynamic generic cast at runtime