balloonatic
Posts: 18
Joined: Mon Aug 16, 2004 7:17 pm
Location: Canada

SMSManagerCF Example

Wed Apr 19, 2006 1:29 am

I have a question regarding the example code. In many of the error handling bits in the example I see the following set of lines...

//Remove the events
m_SMSTrans.SMSReadMessageCompleted += new SMSEventHandler(SMSReadCompleted);
m_SMSTrans.SMSSendMessageError += new SMSEventHandler(SMSReadMessageError);

If we are removing the event handlers shouldn't we be using "-=" instead of "+="? Maybe the comment "// Remove the events" is wrong?
I would think that we would want to be unloading the event if there was an error?


See Yah

bokelund
Posts: 117
Joined: Tue Dec 20, 2005 11:41 am

RE: SMSManagerCF Example

Wed Apr 19, 2006 1:51 pm

Yes, removing the events should of course have a minus sign and we want to that even if there is an error. Sorry about that. Thank you for letting us know!

Regards,
B Bokelund

Franson Support

Return to “BlueTools”