Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: TextBox doubt Pin
James T. Johnson6-Apr-03 4:42
James T. Johnson6-Apr-03 4:42 
GeneralRe: TextBox doubt Pin
Smitha Nishant6-Apr-03 6:11
protectorSmitha Nishant6-Apr-03 6:11 
Generalhttp://www.codeproject.com/csharp/BigInteger.asp Pin
James Wanless6-Apr-03 1:24
James Wanless6-Apr-03 1:24 
General= Operator on TabPage Pin
monrobot135-Apr-03 9:28
monrobot135-Apr-03 9:28 
GeneralRe: = Operator on TabPage Pin
James T. Johnson5-Apr-03 14:00
James T. Johnson5-Apr-03 14:00 
GeneralRe: = Operator on TabPage Pin
monrobot135-Apr-03 19:19
monrobot135-Apr-03 19:19 
GeneralAccessing remoting objects from a remoted object Pin
Alex Korchemniy5-Apr-03 8:41
Alex Korchemniy5-Apr-03 8:41 
GeneralStreamReader Pin
Member Salamon5-Apr-03 8:30
Member Salamon5-Apr-03 8:30 
I am trying to send lines of hex file to commPort wit the serial communication.
I am trying the StreamReader and ReadLine and using textfile to do this job.
My hex file is an Intel hex format for example look like below.

TextFile
:0341000002410079
:0B410000E4C2E8C2E9C2EAC2EB80FEA4
:00000001FF

I have no problem to build this example soultion.
but I get an error when I try to bress button (Sndf3) button.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at BaseTerm.SndF3(StreamReader fr) in baseterm.cs:line 174
at TermForm.SndF3_Click(Object sender, EventArgs e) in termform.cs:line 662


Any suggestion or code help will be great.

Salam Hamid

-----------------------------------------------------------------------------------
Her is My C# code.

baseterm.cs


public void SndF3(StreamReader fr)
{

string input ;

while((input = fr.ReadLine()) != null)
{
for(int i =0; i < (fr.ReadLine().Length); i++)Cry | :(( // Line 174
{
Send((byte)input[i]);
}
frm.ShowMsg("Hex Line OK...");
}

}
//----------------------------------------------------------------------------------

termform.cs

private void SndF3_Click(object sender, System.EventArgs e)
{
StreamReader fr = File.OpenText("P401CR.hex");


BaseTerm.term.SndF3(fr);Cry | :(( // Line 662

fr.Close();

}
GeneralRe: StreamReader Pin
leppie6-Apr-03 2:10
leppie6-Apr-03 2:10 
GeneralRe: StreamReader Pin
James T. Johnson6-Apr-03 4:50
James T. Johnson6-Apr-03 4:50 
GeneralRe: StreamReader Pin
Member Salamon6-Apr-03 5:26
Member Salamon6-Apr-03 5:26 
GeneralTime trials & registration keys Pin
S O S4-Apr-03 19:25
S O S4-Apr-03 19:25 
GeneralRe: Time trials & registration keys Pin
Alex Korchemniy5-Apr-03 8:49
Alex Korchemniy5-Apr-03 8:49 
GeneralRe: Time trials & registration keys Pin
S O S5-Apr-03 23:06
S O S5-Apr-03 23:06 
QuestionHow to create dynamic Menus in smart device application Pin
newtocsharp4-Apr-03 18:28
newtocsharp4-Apr-03 18:28 
AnswerRe: How to create dynamic Menus in smart device application Pin
Stephane Rodriguez.4-Apr-03 19:15
Stephane Rodriguez.4-Apr-03 19:15 
GeneralRe: How to create dynamic Menus in smart device application Pin
J. Dunlap4-Apr-03 20:03
J. Dunlap4-Apr-03 20:03 
GeneralRe: How to create dynamic Menus in smart device application Pin
newtocsharp4-Apr-03 20:52
newtocsharp4-Apr-03 20:52 
GeneralRe: How to create dynamic Menus in smart device application Pin
Stephane Rodriguez.4-Apr-03 21:25
Stephane Rodriguez.4-Apr-03 21:25 
GeneralIOCP in .NET Pin
BestSnowman4-Apr-03 14:06
BestSnowman4-Apr-03 14:06 
GeneralRe: IOCP in .NET Pin
Alex Korchemniy5-Apr-03 8:52
Alex Korchemniy5-Apr-03 8:52 
GeneralRe: IOCP in .NET Pin
James T. Johnson5-Apr-03 13:45
James T. Johnson5-Apr-03 13:45 
QuestionHow to call the default event handler? Pin
Alvaro Mendez4-Apr-03 11:51
Alvaro Mendez4-Apr-03 11:51 
AnswerRe: How to call the default event handler? Pin
neroknights4-Apr-03 12:00
neroknights4-Apr-03 12:00 
GeneralRe: How to call the default event handler? Pin
Alvaro Mendez4-Apr-03 12:27
Alvaro Mendez4-Apr-03 12:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.