Tech Off Post

Single Post Permalink

View Thread: LINQ Question
  • User profile image

    littleguru wrote:
    I can help you with that. They marked all the fields as readonly and removed the getter of the properties. They did it, because they implemented GetHashCode() on the values of the properties and they needed the instance to be immutable for that...

    More is found on my connect bug report about that issue.

    Won't be changed in the final version!

    Thanks for your reply LittleGuru. I read the bug report you filed, and I am upset by this change.

    There is a solution to this problem [I have 50 classes with 200 + lines of code that has LINQ in preparation for final Go Live linceses]. They can implement something like string class. Editing would mean remove old value and add new value, just like in strings. The HashTable would just point to a new reference value as if this value was added through hashtable.add (x,y). and the old value would be removed by its Key.

    Would this not work as in when we edit a String?

    This bug really broke many lines of code for me and its like a nightmare senario.