asp.net - How to trying to avoid message from device if The message is same -


How to try to use a restricted message from the device if the message is the same.
I want to receive messages from the device "OK" while it is connected. So it will respond to me "OK" message, the device sent me a message "OK" after sending me new messages. How can I avoid this message

  var list = new list & lt; String & gt; (); ... // loop or other duplicated code list. Add ("OK"); ... // Summary abstract = string at the end of the code. Joint (".", List.ToArray ()); GotNewmesage (summary);    

Show a message directly, gather all the messages and show them in the verb / Method.

Example:

  var list = new list & lt; String & gt; (); ... // loop or other duplicated code list. Add ("OK"); ... // Summary abstract = string at the end of the code. Joint (".", List.ToArray ()); GotNewmesage (summary);   

If you want to avoid duplicate, check it before adding a message, for example

  if (! List.Contains ("OK ")) List .Add (" OK ");    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -