Tuesday 15 January 2013

c# - How to reset _version list to prevent duplicate states in Spec Explorer -


I have created an explorer explorer project that has a list of system variables. In almost every rule this list is favorable for getting the right result. But when I find out my project, I get a duplicate state. If I compare these states then I find:

  _version: 25 System.Int32 _version: 23 System.Int32  

Googling After this why it happens I came to know that a string is changed to the version every time, even though the version 23 and 25 have the same string, the version number in Speak Explorer thinks they are different, so it is 2 states Produces Is there any way to fix this? Perhaps there is a way to reset the string or to do so that Excel Explorer can force it to accept.

Here is a consideration for a possible root cause:

Rich Kingdom Objects Such sets, sequences, or maps are irreversible, it means, if you want to add an element, then "add" -meth gives a new object with the converted content importantly that the object returned is still the same (but changed Content) is shown as an example, which is called Speck Explorer Is by Then you should reuse this returned object. You can do this by returning the changing object to the static state variable of the model of the program:

  _version = _version.Add (15);  

If a new object in your program is now created with "new" operator in every call to your rule method and this new object is copied to your static state variable The model will always get you a new instance and the Space Explorer will recognize them as separate instances, even if the content is the same.

  _newversion = new set & lt; Int & gt; (); ... _version = _newversion;  

Hope this helps in your case ...


No comments:

Post a Comment