You need to remove the ones not currently in selection and add the new ones.It seems to me it's the same as building a new collection with the current selection.
I was also wondering if it is possible to fast convert objectid to numberHave a look at the ObjectId.OldIdPtr property which returns an IntPtr which has a ToInt64() method.
This method determines equality using the default equality comparer EqualityComparer<T>.Default for T, the type of values in the list.
This method determines equality by using the default equality comparer, as defined by the object's implementation of the IEquatable<T>.Equals method for T (the type of values in the list).
I not following everything here but if look at MSDN docs they tell what is used for methodswell, the basic question is this: comparers compare by something, but what property is the fastest to compare. You can make custom comparer no matter what the list contains. I have shown some numbers that ilustrate speed by comparing different things. This is the limit of my current knowlege :)
List<T>.IList.Remove Method (http://msdn.microsoft.com/en-us/library/bb343997(v=vs.110).aspx)QuoteThis method determines equality using the default equality comparer EqualityComparer<T>.Default for T, the type of values in the list.
List<T>.Contains Method (http://msdn.microsoft.com/en-us/library/bhkz42b3(v=vs.110).aspx)QuoteThis method determines equality by using the default equality comparer, as defined by the object's implementation of the IEquatable<T>.Equals method for T (the type of values in the list).
You can read through them should answer all your questions.
x.OldIdPtr.ToInt64 = y.OldIdPtr.ToInt64
The easiest way to do this would be something like mycollection=nothing, mycollection=implied selection, but I can't do that, i need "added" and "removed" objects.Other than that, doesn't following line, in general, brakes binding?
No.Did you try the code or only read it ?QuoteThe easiest way to do this would be something like mycollection=nothing, mycollection=implied selection, but I can't do that, i need "added" and "removed" objects.
Other than that, doesn't following line, in general, brakes binding?What binding are you talking about ?Code - vb.net: [Select]
lengthAreaList = lengthAreaSet.ToList()
need to remove the ones not currently in selection and add the new ones
I need something like "objects added to selection" and "objects moved from selection"
Now, rembember - i needed "add list" and "remove list".
...Strongly recommend against converting this type for comparison as it is volatile across platforms. Since IntPtr is a base type in .net I would not expect to see its direct comparison suffer significantly. Let me know if I am wrong here.
Also, if used toint32, it doesnt work (maybe because i have 64 machine), and this potentially complicates things if it is to be used in practice.
...