Spaanjaars.Toolkit.ContentRating: Version 1.1
Published 14 years ago
Ever since I wrote the initial version of my ContentRating control back in 2006, I received a massive amount of feedback, both as comments below the article and as private e-mails. Not surprisingly, if you consider the article has been read over 19,000 times and has been rated 444 times (at the time of writing).
Besides getting a lot of "thank you's" from people who liked the control, I also got a lot of requests for a real-world example of a test site using the control. The test site that shipped with the control used fake data stored in ViewState to simulate a real backing store which obviously didn't cut it for a lot of people.
Also, a reader called vgt pointed out a bug in the control where an existing cookie would be overwritten by a new one one, effectively allowing you to vote for the previous item again.
Finally, I had a few requests of my own: I didn't like the default data source of 5 integers if you didn't supply a data source yourself. I also didn't like it that the control didn't raise an exception when you tried to data bind it without a valid data source.
So, enough reasons to fire up Visual Studio and get my hands dirty on some control fixing.Read on ...
How to Check if Two Objects Look Like Each Other Without Using Equals
Published 15 years ago
A colleague (from Design IT) and I were discussing a simple way to check two instances of an object. We wanted to know if all the public properties on one instance were holding the same values as the one on the other instance. We wanted to use this knowledge in a few unit tests to simply check all public fields on an instance in one fell swoop.
Since we didn't want this exact behavior at run-time we couldn't override Equals and check all object's properties, so we had to look for a different solution.Read on ...