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
p c
NA
20
27.3k
Opening .exe file using OpenFileDialog() in C#
Jan 31 2008 8:58 AM
Hi, i want open an .exe file using OpenFileDialog() in C#
The code i ve used is -
Stream strm;
StreamReader reader;
try
{
strm = OpenFileDialog1.OpenFile();
reader = new StreamReader(strm);
}
catch (Exception err)
{
string Message = err.Message + "\n\nCannot open "
+ OpenFileDialog1.FileName;
MessageBox.Show(Message, "Open error",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}
reader.ReadToEnd();
reader.Close();
strm.Close();
But, I m getting an error..
Can anybody tell me the cause....
Thanx in advance
Reply
Answers (
5
)
C++ to C# Slight Problem
How to Update Current Instance of object