Browsing 7239 questions and answers with Jon Skeet
The problem is that the compile-time type of worker is just Worker - and there isn't a Worker.Run method accepting a parameter. This has nothing to do with delegates per se - you wouldn't be able to call worker.Run("foo"); either. The... more 12/13/2013 10:34:58 AM
Why is the third call consistently calling call before the second? It's not doing so consistently - it's doing so about 90% of the time. Basically, synchronization isn't guaranteed to be first-in, first-out... and there's no... more 12/13/2013 9:47:30 AM
It's not clear why you've got char['.'] at all, or what you expect it to mean. I suspect you just want the character literal '.' and use IndexOf. else if (NumBox1.Text.IndexOf('.') == -1 && ...) You only want to use IndexOfAny... more 12/13/2013 7:53:47 AM
This isn't a Xamarin issue. Your code is just broken. Both RemoveFirst and RemoveLast are void methods - they don't return the first/last elements, they just remove them. You'll need to use the First and Last properties, then remove the... more 12/13/2013 7:38:13 AM
If you're fundamentally trying to send arbitrary bytes through a text-based interface, the safest way to do so is to use base-64. There's a Base64 class in Android which makes this very easy. Admittedly this means the size is inflated a... more 12/13/2013 6:45:46 AM
No, it's around so that a collection can return how many elements there are directly, without having to iterate over it. Enumerable.Count() has an optimization such that if the collection implements ICollection<T>, it will use the... more 12/12/2013 6:22:47 PM
Why won't the line "customSequences.get(......." work? You're trying to assign a value to the result of a method call. That's what doesn't work. You can only use the assignment operator with a variable. I suspect you... more 12/12/2013 6:15:26 PM
You're not closing the writer, which means there's data still in the buffer. You should close it (and all the other streams etc) in finally blocks, or use a try-with-resources statement if you're using Java 7. Also note that the way... more 12/12/2013 4:45:43 PM
You're never initializing calcOperands - so on line 60, when you use: calcOperands.add(operand); ... calcOperands is still null, causing the exception. It looks like you have the same problem for your other ArrayList variables. You can... more 12/12/2013 4:18:46 PM
Fortunately it's really simple - you just want SelectMany, which acts as a "flatten" operation: IEnumerable<string> strings = list.SelectMany(x => x); Or avoid Select to start with, and go straight to... more 12/12/2013 1:55:42 PM