Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Exception using == equality operator against null

More
23 Oct 2019 16:11 - 23 Oct 2019 16:11 #7862 by support
Which QuickOPC version are you using? (I cannot rule out that some versions could have the operator '==' defined on easyAEClient, and the exception is coming form inside its implementation)

Anyway, first thing to do to rule this out: Replace these tests by

ReferenceEquals(aeClient, null)

or, in newer C# versions,

aeClient is null

This way no unexpected code can be called for the comparison. And let's see if that helps.

Best regards
Last edit: 23 Oct 2019 16:11 by support.

Please Log in or Create an account to join the conversation.

More
23 Oct 2019 15:21 #7860 by fancybird
Hello ...

Sometimes, we get an exception when checking for aeClient == null.

It does not always happen ... but it happened enough that we had stayed away from doing that.
We had been using a separate variable to track if aeClient had been instantiated.

Is that normal? I am just curious.

Thanks!

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.041 seconds