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
jsheley
NA
8
0
File Stream I/O
Oct 25 2004 6:34 PM
I have a bit of code that makes no sense. What appears to happen is that the "OpenFileDialog" varible neutralises the File I/O. Specifially, the code below works as expected. A file named "Master_Sel.txt" is opened, and "TEST_DATA" is written into it. The file is closed. OpenFileDialog LIB_OPEN = new OpenFileDialog( );// //LIB_OPEN.ShowDialog();//<= Problem Child (%$#$@!!) LIB_OPEN.Dispose(); BinaryWriter LIB_File_Writer = new BinaryWriter(File.Open("Master_Sel.txt", FileMode.OpenOrCreate)); LIB_File_Writer.Equals(LIB_File_Writer.BaseStream); LIB_File_Writer.Write("TEST_DATA"); LIB_File_Writer.Flush(); LIB_File_Writer.Close(); When the "//LIB_OPEN.ShowDialog();" line is un-commented, the Open file dialog appears as expected, but there is no file I/O. This also happens with "Filestream" and Stream writer functions. Can some explain to me how to avoid this problem?
Reply
Answers (
2
)
C# .net console application, leadtools problem on XP
How hide one directory??????