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
Steve
NA
10
0
BinaryReader Object issues
Jan 29 2008 11:57 PM
Hi all! I'm having issues with a basic C# program, on my first attempt. I'm getting a null object not instantiated error when I attempt to ReadByte in the second procedure:
public void Main(string FileName)
{
System.IO.FileStream FS = new System.IO.FileStream(FileName, System.IO.FileMode.Open);
System.IO.BinaryReader BR = new System.IO.BinaryReader(FS);
ReadHeader(ref BR);
BR.Close();
FS.Close();
}
private void ReadHeader(ref System.IO.BinaryReader BR)
{
for (int ii = 0; ii < 32; ii++)
{
MarkerInfo.Header.bB1_32[ii] = BR.ReadByte();
}
}
Any help, much appreciated!
Reply
Answers (
5
)
help with reading from serial port
Referencing Primary key twice in one table