Browsing 7239 questions and answers with Jon Skeet
I suspect the problem is that you're skipping an element after one call to remove, because you're incrementing i and everything in the list is moving up one element. (It's not really clear what the symptoms are at the moment. If this turns... more 2/21/2014 9:55:22 AM
The OptionalAttribute is automatically applied by the compiler when you specify an optional parameter, basically. (It's a bit like ExtensionAttribute being supplied for extension methods.) In IL, it doesn't appear like other attributes -... more 2/21/2014 9:44:25 AM
Is there a reason why the NodaTime JSON.net serializer does not use the ISO8601 Time Interval format to express the start and end instants? Yes. I didn't spot it when reading ISO-8601. It's not a very good reason, but it's the correct... more 2/21/2014 9:23:22 AM
Think of x, y, z and t as bit positions - you're doing a bitwise & which will clear any bits which aren't set in both operands, and 2t will only have the tth bit set. So if x, y and z are all different, 2x + 2y + 2z will have bits x,... more 2/21/2014 6:49:08 AM
The problem is that the iterator block implementation uses explicit interface implementation to implement IEnumerable<T>... and explicit interface implementation doesn't play nicely with dynamic typing in general. (You don't need to... more 2/20/2014 6:07:09 PM
The good news is that the hash computation appears to be working. The bad news is that you're receiving the hash in a brain-dead fashion. For some reason it seems that the authors decided it was a good idea to: Compute the hash... more 2/20/2014 5:57:10 PM
Is it illegal/bad practice to await on synchronous methods like Search()? Well it's a very bad idea, because your UI will hang, basically. You should change your Search method to SearchAsync (for the sake of convention) and use... more 2/20/2014 2:04:28 PM
Yes, the main method belongs to class A, but it is not accessing the private method from inside the current object in the context of the "this" reference. That doesn't matter. That's just not the model of accessibility that Java... more 2/20/2014 7:09:16 AM
As others have pointed out, the problem is that the type of l.head.item is Object, and you can't compare that with an int using != or ==. Options: Cast l.head.item to Integer or int: // This could be done in one step if you wanted int... more 2/20/2014 6:56:49 AM
If you don't care about it, it seems like you just need to set JsonSerializerSettings.MissingMemberHandling appropriately: var settings = new JsonSerializerSettings { MissingMemberHandling = MissingMemberHandling.Ignore }; var tuples... more 2/19/2014 10:35:27 PM